axis manipulations in plots are unnecessarily restrictive
John W. Eaton
jwe at bevo.che.wisc.edu
Fri Jun 6 10:53:50 CDT 2008
On 6-Jun-2008, pstrang wrote:
| http://www.nabble.com/file/p17694734/gregaxd.m gregaxd.m
| http://www.nabble.com/file/p17694734/gregorian.m gregorian.m
|
| The attached gregaxd.m script adjusts the x-axis labels as expected in
| Matlab. But fails in Octave 3.0.0 with gnuplot 4.2.2.
|
| The script takes julian days and coverts them to gregorian and creates
| xticks and labels based on the resolution you enter, for example:
| "gregaxd(column(:,1),7)" converts the current plot x-axis labels in julian
| days to gregorian with ticks and labels spaced 7 days apart.
|
| Here are the errors I get:
|
| octave:23> gregaxd(results(:,1),7)
| warning: set: invalid property `xticklabels'
| warning: set: invalid property `units'
| warning: get: invalid property `pos'
| error: value on right hand side of assignment is undefined
| error: evaluating assignment expression near line 49, column 4
| error: called from `gregaxd' in file `/home/xxxx/time_scripts/gregaxd.m'
What is the value of "results(:,1)" in this example? If you want
help, then please provide complete examples that people can run
without having to guess parameter values.
| Since, as mentioned, the goal here is Matlab compatibility, here is an
| instance that works in Matlab, but fails in Octave.
|
| Ideas?
In Matlab, it appears that the "xticklabels" property has been renamed
to "xticklabel", so Octave probably will not support "xticklabels".
I think you should change your code.
Also, in Matlab, "pos" seems to be accepted as an alias for the
"position" property, but "pos" is not documented, so I don't expect
that we will support that either. I think you should use "position"
instead.
You will have to use the current development version of Octave or
wait for the next major stable release (either 3.1 or 3.2 depending on
what we decide to do about version numbering) to get the units property.
It won't appear in any 3.0.x release.
jwe
More information about the Bug-octave
mailing list