[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desired features for gp backend?
From: |
Ben Abbott |
Subject: |
Re: desired features for gp backend? |
Date: |
Thu, 18 Jun 2009 18:35:40 -0400 |
On Jun 18, 2009, at 12:15 PM, John W. Eaton wrote:
On 18-Jun-2009, Rob Mahurin wrote:
| Here's an example I've been thinking about for a while: I'd like
| enough control over Octave's axes to make Tufte's "dot-dash" and
| "range-frame" plots. There are currently examples of each at
| http://hupp.org/adam/weblog/category/tufte/
|
| I can do the dot-dash axes in gnuplot with "set border 0" followed
by
| "set xtics (...data...)" to put major and minor tics in the right
| place. But in gnuplot, constructing a command from a datafile is
| something of a major undertaking. In octave it's now a one-liner
| set(gca,"xticks", get(get(gca,"children"),"xdata"))
| but that currently puts a label at every point without some clever
set
| (gca,"xticklabel"), and apparently I can't yet specify minor ticks.
Do you mean that it is not currently possible to specify minor tick
labels, or the locations of minor ticks? Is this a limitation in
Octave only, or also Matlab?
| It looks like I even sent a patch suggesting an octave syntax for
| axis ticks without lines, but it wasn't accepted:
| http://www.nabble.com/axis-manipulations-in-plots-are-
unnecessarily-
| restrictive-td15880016.html
There were a number of replies to your orignal message, and it was
some time ago. So if there is still something that was not done or
does not work now, please submit a new patch or bug report.
jwe
Regarding the old thread, I noticed the suggestion to allow the
ticklabels to be formated as ...
set (gca, "xticklabel", "%.2f")
This can be done as a one-liner ...
set (gca, "xticklabel", sprintf("%.2f|", get (gca, "xtick")))
However, I think it more convenient to support having the ticklabels
specified as format statements. If the y-axes units were dollars ...
set (gca, "yticklabel", "$%.2f")
If the units were um
set (gca, "yticklabel", "%.2fum")
etc.
However, is the check below sufficient to qualify the ticklabel string
as being a format?
ischar (ticklabel) && size (ticklabel, 1) == 1 && any (ticklabel=="%")
... or should something more explicit be done?
Ben
changeset.patch
Description: Binary data