mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
bugfix for axes extent
This commit is contained in:
parent
d542299e49
commit
bcf93c34d2
@ -467,7 +467,7 @@ public class GraphicFactory {
|
||||
if (!fixZ) {
|
||||
z = zIter.getDoubleNext();
|
||||
}
|
||||
if (Double.isNaN(y) || Double.isNaN(x)) {
|
||||
if (Double.isNaN(y) || Double.isNaN(x) || Double.isNaN(z)) {
|
||||
if (points.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1074,8 +1074,8 @@ public class Plot3DGL extends Plot implements GLEventListener {
|
||||
ex = ex.to3D();
|
||||
}
|
||||
this.graphicExtent = (Extent3D) ex;
|
||||
this.setAxesExtent((Extent3D) graphicExtent.clone());
|
||||
if (!fixExtent) {
|
||||
this.setAxesExtent((Extent3D) graphicExtent.clone());
|
||||
this.setDrawExtent((Extent3D) this.graphicExtent.clone());
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ public class Plot3D extends Plot {
|
||||
// <editor-fold desc="Variables">
|
||||
private final GraphicCollection3D graphics;
|
||||
private Extent3D extent;
|
||||
private Extent3D axesExtent;
|
||||
private ChartText title;
|
||||
private List<ChartLegend> legends;
|
||||
private Axis xAxis;
|
||||
@ -549,6 +550,22 @@ public class Plot3D extends Plot {
|
||||
this.projector.setZRange(zmin, zmax);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get axes extent
|
||||
* @return Axes extent
|
||||
*/
|
||||
public Extent3D getAxesExtent() {
|
||||
return this.axesExtent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set axes extent
|
||||
* @param value Axes extent
|
||||
*/
|
||||
public void setAxesExtent(Extent3D value) {
|
||||
this.axesExtent = value;
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
// <editor-fold desc="Methods">
|
||||
private void updateExtent() {
|
||||
|
||||
@ -36,5 +36,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="-7,-7" MainFormSize="1293,685"/>
|
||||
<Startup MainFormLocation="-7,0" MainFormSize="1409,776"/>
|
||||
</MeteoInfo>
|
||||
|
||||
Binary file not shown.
@ -303,7 +303,7 @@ class Axes3D(Axes):
|
||||
zmax = limits[5]
|
||||
extent = Extent3D(xmin, xmax, ymin, ymax, zmin, zmax)
|
||||
self.axes.setDrawExtent(extent)
|
||||
self.axes.setExtent(extent.clone())
|
||||
self.axes.setAxesExtent(extent.clone())
|
||||
return True
|
||||
else:
|
||||
print('The limits parameter must be a list with 6 elements: xmin, xmax, ymin, ymax, zmin, zmax!')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user