axis manipulations in plots are unnecessarily restrictive
John W. Eaton
jwe at bevo.che.wisc.edu
Thu Mar 6 12:22:00 CST 2008
On 6-Mar-2008, Rob Mahurin wrote:
| The change to "graphics handle" plot manipulation has made some
| tweaks to gnuplot's default axes impossible. I have (somewhat)
| rewritten them in the new language and would be glad to see them
| officially supported in a later version of Octave.
| # eliminate the tics, but keep the box
| set(gca,"visible","lines");
Try
set (gca, "xtick", [], "ytick", []);
instead.
| A statement like
| set(gca,"thickness",0);
| should send "set border lw 0;\n" to the gnuplot backend.
I think the correct property name for this is "linewidth", and it has
already been added to the current development sources, though nothing
is done with the new property in the __go_draw_axes__ function yet, so
I just made the attached change.
| It should be possible to use produce formatted ticklabels, e.g.
| set(gca,"xticklabels","%.3f");
I don't think Matlab's ticklabels properties have this feature, though
it might be a useful to have it.
| Until Octave implements this, the backend's formatting options should
| be available.
The goal is not to expose every feature of a particular graphics
backend, but to provide Matlab compatible graphics functionality. We
think that's what most users of Octave want and expect, so that's what
we are aiming for. Eventually, I doubt that gnuplot will be the
default backend because. If you want all the features of gnuplot, I
suggest you write your data to a file and use gnuplot directly.
| I don't know where to add handle members like "thickness" or
| "formatlabels" to make those two changes optional: set() correctly
| refuses to add new members.
Plot properties are handled in src/graphics.h.in and src/graphics.cc.
jwe
More information about the Bug-octave
mailing list