Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
As was pointed out in comment #1, very small values are always going to be a problem with plotting systems. In particular, Octave uses OpenGL for rendering plots (unless you are using the gnuplot toolkit) and OpenGL uses single precision for all values such as coordinates.
The solution, also pointed out in comment #1, is simply to scale your data. For example,
xs = x * 1e12; plot (xs, y); xlabel ("X (in picomoters)");
You could also set the ticklabels manually.
plot (1:4, 1:4, 'o-'); set (gca, "xtick", 1:4); set (gca, "xticklabels", {"1e-10", "2e-10", "3e-10", "4e-10"})
On newer versions of Octave the interpreter for the ticklabels is "tex" so you can even have superscripts and subscripts. The example above could be
set (gca, "xticklabels", {"1^{-10}", "2^{-10}", "3^{-10}", "4^{-10}"})
which shows rather nicely as
(file plot_exp_labels.png)
Can you change the x axis units to nanometers or picoseconds or something so you get better numerical values? Using 1e-10 as Axios tick intervals is asking for avoidable trouble with any plotting system, not just Octave.
A plot with three different subplots has been created, and the axes of each subplot have been scaled using the axis() function. The axis scaling values are very small: axis([-1e-10 4e-10 0 15000]).
When printing the figure to a file using:
print -dpng filename.png
results in autoscaling all three plots prior to converting the plot to png.
When using larger values in the axis function, such as: axis([-1 4 0 15000), printing the plot to a files does not autoscale the plot and maintains the axis. In this case the plot is printed with the correct axes.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9