Wed 03 Jul 2013 02:39:12 PM UTC, comment #3:
With your extra information I re-opened the bug report. I'm lowering the priority because there is a workaround. I also changed the type to "Matlab Compatibility" rather than "Incorrect Result". Finally, I re-titled the report since this isn't about plotyy, per se, but rather the behavior of Octave when 'xscale' is changed.
|
Wed 03 Jul 2013 08:21:55 AM UTC, comment #2:
Hello Rik,
Thank you for pointing out the "@semilogx" option for me. This does indeed do what i need. However the original bug is still valid.
Octave should threat XScale like both Matlab and gnuplot threat it. Which is that XTick, XTickLabel and Xminortick values should be updated when XScale changes value.
In Matlab there seems to be no change in behavior between
and
In Matlab (2012b version):
In Matlab when XTickmode=manual, only the Xminortick changes when XScale changes. XTick values and XTickLabel remain unchanged.
|
Tue 02 Jul 2013 11:19:14 PM UTC, comment #1:
I think there may be some confusion about the difference between logarithmic scaling and a logarithmic axis. Setting the 'Xscale' to log results in logarithmic spacing for the existing 'Xtick' values.
A logarithmic axis is really a collection of options which together produce what one thinks of as a log axis. These include:
'help plotyy' gives an example of using a linear y-axis and a logarithmic y-axis together in plotyy. You can get a logarithmic x-axis with
Or you can set all of the properties I mentioned on each of the axes.
This, anyways, is how Octave treats Xscale. If you have access to Matlab you might verify that setting Xscale to 'log' only scales the axis but does not produce the other changes such as the Xminorticks that are associated with a logarithmic axis.
|
Tue 02 Jul 2013 07:02:41 AM UTC, original submission:
By default a plotyy results in linear axes. This can be changed to logarithmic e.g. with:
In the fltk backend the ticks will remain linear instead of logarithmic. In the gnuplot backend the visual result is correct. However when getting the XTick values from the axis with e.g.:
... still gives the linear values, instead of the logarithmic values.
To reproduce with the fltk backend:
The XTick position are now linear, but they should be logarithmic.
To reproduce with the gnuplot backend:
Now the plot is visually correct, with XTick labels at 1, 10 and 100. However answer from the above get commands still incorrect.
|