Sun 29 Jan 2017 07:07:36 PM UTC, comment #11:
I committed your final patch dealing with axislocation here (http://hg.savannah.gnu.org/hgweb/octave/rev/868daa374c49).
The only important thing I had to do was shorten lines > 80 characters by breaking them at appropriate points in the code.
|
Tue 15 Nov 2016 10:26:02 PM UTC, comment #10:
The attached patch should now be compatible to Matlab.
(file #38982)
|
Mon 14 Nov 2016 06:59:49 PM UTC, comment #9:
I checked in Matlab. It moves the axes to the border which is closer to 0 for logarithmic axes. Will update the logic when I find some time.
|
Sat 05 Nov 2016 01:27:02 PM UTC, comment #8:
Faster than expected. Attached is a patch that should cover the issues.
I am not sure what should happen for a logarithmic plot with the other axislocation set to origin.
Without doing anything specifically, the axis landed at 1 (10^0) or -1. So I went with this. I hope this is OK. I'll test in Matlab when I have time next week.
(file #38894)
|
Fri 04 Nov 2016 07:34:20 PM UTC, comment #7:
That sounds good, thanks for investigating so thoroughly.
|
Fri 04 Nov 2016 07:01:33 PM UTC, comment #6:
Rik, thank you for reviewing and pushing the patch.
The values of "ytick" does not change in your example from comment #5 in Matlab. However, some "yticklabel" are empty. It looks like the first and the last ytick are not plotted (independent of whether 'xaxislocation' is 'top', 'bottom' or 'origin' or whether the box is on or off). This is probably so that the labels do not overlap with the (potential) box. I think we can do better than Matlab in this respect and only omit those labels that really coincide with the box or the other axis.
I also noticed that the labels and ticks switch sides once the origin is higher than half the axis height.
Furthermore, the axis is drawn at the border if the origin is outside the axis limits.
I think I can post a patch for these issues within a week or so...
|
Tue 01 Nov 2016 11:07:25 PM UTC, comment #5:
This is certainly a big improvement. I applied the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/074765d5c83b).
One thing to note is that the labels at the origin overlap the axes line now. A simple workaround is to manually set the ticks to exclude the origin. But it might be nice to have this done automatically. This could be done either in graphics.cc where the ticks are calculated, or in gl-render.cc where the ticks are displayed. In either case, there is a bit of mixing between the X and Y axes. For example, if the X axes is "top", then it is the maximum ytick which needs to be removed.
Example from 'demo axis 13'
Corrected by
What does Matlab return for
That might tell us whether the ticks are being chosen differently, or whether it is only the display of the ticks which is suppressed.
|
Thu 15 Sep 2016 05:08:28 AM UTC, comment #4:
@Markus: Thanks for the patch. Since this is more of a feature addition, rather than a bug fix, I think it will be committed after the 4.2 release.
|
Mon 12 Sep 2016 04:56:02 PM UTC, comment #3:
Attached please find a patch that adds support for "(xy)axislocation" being set to "origin" for the OpenGL renderer.
The results still differ slightly from Matlab. But at least it can compare to the "gnuplot" toolkit. Please, see demo axis 9-13 for the results.
I am not sure whether I should also add support for "zero" which is already marked as deprecated anyway.
(file #38482)
|
Tue 16 Aug 2016 09:34:51 PM UTC, comment #2:
Thank you for your patch.
I've mentioned the changes to NEWS and pushed this cset:
http://hg.savannah.gnu.org/hgweb/octave/rev/1ddb53b6ad30
The changes to axis.m were already been done in http://hg.savannah.gnu.org/hgweb/octave/rev/283d8dfcad37
Now please go ahead and also change the opengl renderer to support it :-)
|
Tue 19 Jul 2016 05:28:15 PM UTC, comment #1:
Attached is a changeset for the easy part of this bug.
(file #37952)
|
Tue 19 Jul 2016 03:55:31 PM UTC, original submission:
In recent Matlab versions, it is possible to set "xaxislocation" (and/or "yaxislocation") to "origin" [1] which does essentially the same what gnuplot does currently when these properties are set to "zero".
I think I can upload the easy part shortly. That would probably be:
- Add "origin" to the list of accepted values for "(xy)axislocation".
- Deprecate "zero" (for Octave 4.6?).
- Add the synonym to "__gnuplot_draw_axes__.m".
I'll keep the hard part - implementing it for the opengl renderer - probably for a later part if no one else wants to give it a go earlier.
[1] http://de.mathworks.com/help/matlab/examples/controlling-axis-location.html
|