|
HI,
I am using jzy3d library for drawubg 2d and 3d models.
private Shape getSurface(double[][] plotValues, int steps) {
// Create the object to represent the function over the given range.
ArrayList<Variable> selectedVars = surrogateModel
.getSelectedVariables();
Variable selectedVar1 = selectedVars.get(0);
Variable selectedVar2 = selectedVars.get(1);
Range range1 = new Range(selectedVar1.getMinRange(),
selectedVar1.getMaxRange());
Range range2 = new Range(selectedVar2.getMinRange(),
selectedVar2.getMaxRange());
// final Shape surface
final Shape surface = (Shape) ExtendedBuilder.buildOrthonormal(
new ExtendedOrthonormalGrid(range1, steps, range2, steps),
plotValues);
surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface
.getBounds().getZmin(), surface.getBounds().getZmax(),
new Color(1, 1, 1, 1f)));
surface.setWireframeDisplayed(true); // sets/unsets the black
// gridlines on the plot
if (surface.getWireframeDisplayed())
surface.setWireframeColor(Color.BLACK);
if (selectedVars != null) {
String xLabel = selectedVar1.getName();
String yLabel = selectedVar2.getName();
String zLabel = surrogateModel.getSelectedResponse().getName();
setAxeLabels(chart1, xLabel, yLabel, zLabel);
setAxeLabels(chart2, xLabel, yLabel, zLabel);
}
IAxeLayout layout = chart1.getView().getAxe().getLayout();
colorbar = new Colorbar(surface, layout);
surface.setLegend(colorbar);
return surface;
}
predShape = getSurface(plotValues, steps);
predShape.setLegendDisplayed(false);
chart1.getScene().getGraph().add(predShape, false);
component1 = (Component) chart1.getCanvas();
component1.repaint();
I am adding this surface to my canvas.
The grid lines appear fine on Windows XP.
But when i switch my OS to Windows 7, the grid lines are no longer straight... the grid is not displayed properly on Windows 7.
Can anyone help me with this?
|