bugfix of savefig function

This commit is contained in:
wyq 2024-09-20 11:06:30 +08:00
parent f94f3dd9bf
commit 704a10af99
7 changed files with 28 additions and 33 deletions

View File

@ -67,7 +67,7 @@ import java.util.zip.ZipInputStream;
public static String getVersion() {
String version = GlobalUtil.class.getPackage().getImplementationVersion();
if (version == null || version.equals("")) {
version = "3.9.4";
version = "3.9.5";
}
return version;
}

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Temp\test">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\slice"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\imshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\radar"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\dataconvert"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\grib"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\webmap"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
@ -14,19 +8,25 @@
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\animation"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
<RecentFolder Folder="D:\Temp\test"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\slice"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\mesh"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\fill"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\slice\slice_2d.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\ghost_halloween.py"/>
<OpenedFile File="D:\Temp\test\test.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow\layer_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_airplane.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\slice\slice_2d.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\ghost_halloween.py"/>
<RecentFile File="D:\Temp\test\test.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow\layer_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_airplane.py"/>
</RecentFiles>
</File>
<Font>
@ -34,5 +34,5 @@
</Font>
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
<Figure DoubleBuffering="true"/>
<Startup MainFormLocation="-7,-7" MainFormSize="1293,765"/>
<Startup MainFormLocation="-7,0" MainFormSize="1348,825"/>
</MeteoInfo>

View File

@ -4433,8 +4433,6 @@ class PolarAxes(Axes):
lab = '%s - %s' % (wsbins[i], wsbins[i + 1])
bb = self.bar(theta, wdhist, width, bottom=hhist, color=colors[i], \
edgecolor='gray', label=lab, morepoints=True)
#bb.setStartValue(wsbins[i])
#bb.setEndValue(wsbins[i + 1])
bars.append(bb)
hhist = hhist + wdhist

View File

@ -916,10 +916,9 @@ def axes3dgl(*args, **kwargs):
ax = Axes3DGL(*args, **kwargs)
g_axes = ax
if not batchmode:
if g_figure is None:
figure(**kwargs)
g_figure.add_axes(ax)
if g_figure is None:
figure(**kwargs)
g_figure.add_axes(ax)
draw_if_interactive()
return ax
@ -936,10 +935,9 @@ def axes3d_map(*args, **kwargs):
ax = MapAxes3D(*args, **kwargs)
g_axes = ax
if not batchmode:
if g_figure is None:
figure(**kwargs)
g_figure.add_axes(ax)
if g_figure is None:
figure(**kwargs)
g_figure.add_axes(ax)
draw_if_interactive()
return ax
@ -956,12 +954,11 @@ def axes3d_earth(*args, **kwargs):
ax = EarthAxes3D(*args, **kwargs)
g_axes = ax
if not batchmode:
if g_figure is None:
if 'facecolor' not in kwargs.keys():
kwargs['facecolor'] = 'k'
figure(**kwargs)
g_figure.add_axes(ax)
if g_figure is None:
if 'facecolor' not in kwargs.keys():
kwargs['facecolor'] = 'k'
figure(**kwargs)
g_figure.add_axes(ax)
draw_if_interactive()
return ax
@ -1084,9 +1081,9 @@ def savefig(fname, width=None, height=None, dpi=None, sleep=None):
if height is None:
height = g_figure.getHeight() if not g_figure is None else 400
if dpi is None:
JOGLUtil.saveImage(g_axes._axes, fname, width, height)
JOGLUtil.saveImage(g_figure.chart, fname, width, height)
else:
JOGLUtil.saveImage(g_axes._axes, fname, width, height, dpi)
JOGLUtil.saveImage(g_figure.chart, fname, width, height, dpi)
else:
if fname.endswith('.eps') or fname.endswith('.pdf'):
dpi = None

View File

@ -35,7 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<revision>3.9.4</revision>
<revision>3.9.5</revision>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>