Fixed AxisItem to support unicode in tick strings
This commit is contained in:
parent
a199b75c66
commit
21c1686221
@ -34,6 +34,7 @@ pyqtgraph-0.9.9 [unreleased]
|
|||||||
- Gave .name() methods to PlotDataItem, PlotCurveItem, and ScatterPlotItem
|
- Gave .name() methods to PlotDataItem, PlotCurveItem, and ScatterPlotItem
|
||||||
- fixed ImageItem handling of rgb images
|
- fixed ImageItem handling of rgb images
|
||||||
- fixed makeARGB re-ordering of color channels
|
- fixed makeARGB re-ordering of color channels
|
||||||
|
- fixed unicode usage in AxisItem tick strings
|
||||||
|
|
||||||
|
|
||||||
pyqtgraph-0.9.8 2013-11-24
|
pyqtgraph-0.9.8 2013-11-24
|
||||||
|
@ -24,6 +24,7 @@ Contributors
|
|||||||
* Felix Schill
|
* Felix Schill
|
||||||
* Guillaume Poulin
|
* Guillaume Poulin
|
||||||
* Antony Lee
|
* Antony Lee
|
||||||
|
* Mattias Põldaru
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
@ -43,7 +44,8 @@ Installation Methods
|
|||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
* To use with a specific project, simply copy the pyqtgraph subdirectory
|
* To use with a specific project, simply copy the pyqtgraph subdirectory
|
||||||
anywhere that is importable from your project
|
anywhere that is importable from your project. PyQtGraph may also be
|
||||||
|
used as a git subtree by cloning the git-core repository from github.
|
||||||
* To install system-wide from source distribution:
|
* To install system-wide from source distribution:
|
||||||
`$ python setup.py install`
|
`$ python setup.py install`
|
||||||
* For instalation packages, see the website (pyqtgraph.org)
|
* For instalation packages, see the website (pyqtgraph.org)
|
||||||
@ -62,4 +64,4 @@ Some (incomplete) documentation exists at this time.
|
|||||||
`$ make html`
|
`$ make html`
|
||||||
|
|
||||||
Please feel free to pester Luke or post to the forum if you need a specific
|
Please feel free to pester Luke or post to the forum if you need a specific
|
||||||
section of documentation.
|
section of documentation to be expanded.
|
||||||
|
@ -795,7 +795,7 @@ class AxisItem(GraphicsWidget):
|
|||||||
if s is None:
|
if s is None:
|
||||||
rects.append(None)
|
rects.append(None)
|
||||||
else:
|
else:
|
||||||
br = p.boundingRect(QtCore.QRectF(0, 0, 100, 100), QtCore.Qt.AlignCenter, str(s))
|
br = p.boundingRect(QtCore.QRectF(0, 0, 100, 100), QtCore.Qt.AlignCenter, asUnicode(s))
|
||||||
## boundingRect is usually just a bit too large
|
## boundingRect is usually just a bit too large
|
||||||
## (but this probably depends on per-font metrics?)
|
## (but this probably depends on per-font metrics?)
|
||||||
br.setHeight(br.height() * 0.8)
|
br.setHeight(br.height() * 0.8)
|
||||||
@ -830,7 +830,7 @@ class AxisItem(GraphicsWidget):
|
|||||||
vstr = strings[j]
|
vstr = strings[j]
|
||||||
if vstr is None: ## this tick was ignored because it is out of bounds
|
if vstr is None: ## this tick was ignored because it is out of bounds
|
||||||
continue
|
continue
|
||||||
vstr = str(vstr)
|
vstr = asUnicode(vstr)
|
||||||
x = tickPositions[i][j]
|
x = tickPositions[i][j]
|
||||||
#textRect = p.boundingRect(QtCore.QRectF(0, 0, 100, 100), QtCore.Qt.AlignCenter, vstr)
|
#textRect = p.boundingRect(QtCore.QRectF(0, 0, 100, 100), QtCore.Qt.AlignCenter, vstr)
|
||||||
textRect = rects[j]
|
textRect = rects[j]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user