bugfix for imshow extend need to be cloned

This commit is contained in:
wyq 2024-03-18 23:28:31 +08:00
parent 869ecb9169
commit b452341b6d
7 changed files with 21 additions and 17 deletions

View File

@ -1380,7 +1380,7 @@ public abstract class AbstractPlot2D extends Plot {
y = (float) area.getHeight() / 2 - dim.height / 2;
break;
case RIGHT_OUTSIDE:
if (this.getAxis(Location.RIGHT).isDrawTickLabel() || this instanceof PolarPlot) {
if (this.getAxis(Location.RIGHT).isDrawTickLine() || this instanceof PolarPlot) {
x = (float) area.getX() + (float) area.getWidth() + (float) this.getTightInset().getRight();
x = x - dim.width;
} else {

View File

@ -1476,7 +1476,9 @@ public class Plot2D extends AbstractPlot2D {
ShapeTypes stype = ShapeTypes.POLYLINE;
ls = new LegendScheme(stype);
for (Graphic g : this.graphics.getGraphics()) {
ls.getLegendBreaks().add(g.getLegend());
if (g.getShapeType() == ShapeTypes.POLYLINE) {
ls.getLegendBreaks().add(g.getLegend());
}
}
}
return ls;

View File

@ -1,32 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\plot">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\imshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite\FY"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\calc"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\contour"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\io\geotiff">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\test"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\traj"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\dataframe"/>
<RecentFolder Folder="D:\MyProgram\java\MeteoInfoDev\MeteoInfo\meteoinfo-lab"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\burf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\wrf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart\legend"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\geotiff"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\flower_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\calc\frontogenesis.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\plot\plot_nan.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\geotiff\geotiff_dem_3.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\geotiff\geotiff_dem_2.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\flower_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\calc\frontogenesis.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\plot\plot_nan.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\geotiff\geotiff_dem_3.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\geotiff\geotiff_dem_2.py"/>
</RecentFiles>
</File>
<Font>

View File

@ -336,7 +336,7 @@ class DimVariable(object):
"""
a = self.read()
if a._array.getDataType() != DataType.STRUCTURE:
print 'This method is only valid for structure array!'
print('This method is only valid for structure array!')
return None
a = a._array.getArrayObject()
return a.findMember(member)
@ -352,7 +352,7 @@ class DimVariable(object):
"""
a = self.read()
if a._array.getDataType() != DataType.STRUCTURE:
print 'This method is only valid for structure array!'
print('This method is only valid for structure array!')
return None
a = a._array.getArrayObject()

View File

@ -1125,8 +1125,8 @@ class MapAxes(Axes):
if zorder is None:
zorder = 0
igraphic = self.add_graphic(igraphic, zorder=zorder)
self._axes.setDrawExtent(igraphic.getExtent())
self._axes.setExtent(igraphic.getExtent())
self._axes.setDrawExtent(igraphic.getExtent().clone())
self._axes.setExtent(igraphic.getExtent().clone())
gridline = self._axes.getGridLine()
gridline.setTop(True)