Allow Y axis to be reversed AND scaled based on X axis scale in -JX using the "-0" option
|Target version:||Candidate for next minor release|
I just realized that using for example "-JX10c/-0" in psbasemap doesn't work if I want the Y axis to be scaled on the X axis and reversed.
Any idea how I can do that?
#1 Updated by Remko over 2 years ago
Yes, unfortunately "-JX10c/-0" does not work, since the user interface would not recognise the difference between 0 and -0, and besides, does not recognise a 0 scale as one that would follow the X axis.
The solution would be to use a relative size of your plot, that is, in centimeters per data unit.
Assuming that your plot is 10 units wide, you can use "-Jx1c/-1c" (note the lowercase "x").
#3 Updated by Paul about 2 years ago
- Status changed from New to Resolved
- Assignee set to Paul
- Target version set to Candidate for next minor release
- % Done changed from 0 to 100
I have fixed this in r18492. The key problem is that we did not recompute the ymin/ymax raw projected values after the scale is set. This works fine if it is positive as ymin is 0 anyway, but if doing -0 it fails badly. The solution was to recalculate the min/max properly. I check for the "-0" string and set a parameter so we know what is required. Give it a spin. Works similarly for auto-xscaling of course. Trunk only (now 6.0.0_r18492).