surfaceplotter icon indicating copy to clipboard operation
surfaceplotter copied to clipboard

2D plot rotation and scale

Open ariaveta opened this issue 5 years ago • 2 comments

Hello I'm using the library to plot 2 functions in 2D (surface) and 3D mode.

I set XMin and YMin to 0 and the I set XMax and YMax to different values. I set the ScaleBox to true.

I'm expecting to see a scaled 2D rectangle in 2D mode and a scaled 3D box in 3D mode.

I see a correctly scaled rectangle if I plot function 1 and a rotated by 90 degrees rectangle if choose the second function. Can someone explain why?

Am I missing something? Thanks, Marco

ariaveta avatar May 29 '20 08:05 ariaveta

I see in the output: "Error in ranges" . It seems (see code snippet below) that xi>xx or yi> yy.. in my case it is quite impossibile, because xi=yi=0.0 and xx an yy are quite bigger..

try { xi = getXMin(); yi = getYMin(); xx = getXMax(); yx = getYMax(); if ((xi >= xx) || (yi >= yx)) throw new NumberFormatException(); } catch (NumberFormatException e) { setMessage("Error in ranges"); return; }

ariaveta avatar May 29 '20 09:05 ariaveta

Just an update: the "Error in ranges" message was related to Z axis ranges, not X and Y. My problem is still there: in 2D mode I see a different scaled rectangle if I select function 1 or function 2. Any hint? Thanks Marco

ariaveta avatar May 30 '20 10:05 ariaveta