mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Fix missing imports needed for drawing the legend
This commit is contained in:
@@ -30,7 +30,7 @@ Changes in this release include the following:
|
||||
|
||||
* New tool wxget, (a minimal wx implementation of wget)
|
||||
|
||||
* New tools wxdocs and wxdemos to launch the respective items fetching and
|
||||
* New tools wxdocs and wxdemos to launch the respective items, fetching and
|
||||
unpacking as required. (#437)
|
||||
|
||||
* Fixes to ensure that the locale message catalogs are included in the
|
||||
@@ -70,6 +70,8 @@ Changes in this release include the following:
|
||||
|
||||
* Add wx.Simplebook class.
|
||||
|
||||
* Fix missing imports needed for drawing the legend in wx.lib.plot. (#503)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2234,10 +2234,15 @@ class PlotCanvas(wx.Panel):
|
||||
# 1.1 used as space between lines
|
||||
lineHeight = max(legendSymExt[1], legendTextExt[1]) * 1.1
|
||||
dc.SetFont(self._getFont(self._fontSizeLegend))
|
||||
|
||||
from .polyobjects import PolyLine
|
||||
from .polyobjects import PolyMarker
|
||||
from .polyobjects import PolyBoxPlot
|
||||
|
||||
for i in range(len(graphics)):
|
||||
o = graphics[i]
|
||||
s = i * lineHeight
|
||||
if isinstance(o, PolyMarker) or isinstance(o, BoxPlot):
|
||||
if isinstance(o, PolyMarker) or isinstance(o, PolyBoxPlot):
|
||||
# draw marker with legend
|
||||
pnt = (trhc[0] + legendLHS + legendSymExt[0] / 2.,
|
||||
trhc[1] + s + lineHeight / 2.)
|
||||
|
||||
Reference in New Issue
Block a user