[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
plotting issues, single precision question with current toolkits
From: |
Nicholas Jankowski |
Subject: |
plotting issues, single precision question with current toolkits |
Date: |
Tue, 10 Nov 2015 14:15:11 -0500 |
referring to a recent discussion on the help list
http://octave.1599824.n4.nabble.com/Cant-do-simple-XY-plot-tp4673375.html
Seems there were two issues. One is the known issue with single
precision representation and plotting, and datenum producing numbers
that were a problem there. The second I didn't see any reference to,
and I'm not sure if it's a separate issue. It seems that the plot is
not always autoscaling to the data. Not sure if the two are related.
Code snippet below:
Also, done with gnuplot because both qt and fltk fail due to the
magnitude of the x-vector numbers:
----------------
graphics_toolkit('gnuplot')
xvec = zeros(1,10000);
for ii = 1:10000
xvec(ii) = now;
for jj = 1:100
ii+jj;
endfor
endfor
plot(xvec,sin(xvec));
-------------
This produces a plot with the x-axis going from 0 to ~750,000 or so,
and all the data is pinned at the right. clicking the autoscale
button, or manually setting axis([min max]) give a correct plot of the
data, but shouldn't the initial plot default to that autoscaled view?
The other person commented that Matlab's plot output had it autoscaled
immediately.
So either an actual display bug or a compatibility bug? I've tried the
same with some other data and it autoscales. I.e.,:
xvec = [now:(1/24)/3600:now+0.1];
plot(xvec,sin(xvec));
autoscales just fine.
So, long story short: is the autoscaling a bug (known/unknown), is it
a wierd artifact of the data used, still just related to the single
precision thing?
Nick J.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- plotting issues, single precision question with current toolkits,
Nicholas Jankowski <=