octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46168] OpenGL use of single causing problems


From: Rik
Subject: [Octave-bug-tracker] [bug #46168] OpenGL use of single causing problems in errorbar
Date: Fri, 09 Oct 2015 23:20:42 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)

Update of bug #46168 (project octave):

                Category:                Plotting => Plotting with OpenGL   
                 Summary: Bug in errorbar() when X coordinates are near each
other => OpenGL use of single causing problems in errorbar

    _______________________________________________________

Follow-up Comment #1:

I don't think the problem is errorbar.  I think you're running into the fact
that OpenGL uses class single to represent numbers.  If I switch to gnuplot
for plotting, which uses doubles to represent numbers, then the plot looks
alright.


graphics_toolkit gnuplot
x=[2000.59 2000.60 2000.61];
y=[0.00 2.10 -2.70];
ey=[1.36 2.49 2.79];
errorbar(x,y,ey,'.');
print('test_errorbar.pdf','-dpdf');


It's not the fact that the numbers are close together, it's the fact that
you're asking for a precision of .01 / 2000 or 5 parts per million.  An easy
way around this is to scale the numbers.  See below.


x=[2000.59 2000.60 2000.61];
x = x - 2000;
y=[0.00 2.10 -2.70];
ey=[1.36 2.49 2.79];
errorbar(x,y,ey,'.');


If you want the plot to actually read correctly you can change the xticklabel
property on the axis manually.  Assuming the code above,


set (gca, "xtick", [0.59, 0.60, 0.61]);
set (gca, "xticklabel", {"2000.59", "2000.60", "2000.61"});




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46168>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]