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

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

[Octave-bug-tracker] [bug #48350] plot error calculating yticks on large


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #48350] plot error calculating yticks on large constant plus small delta
Date: Fri, 1 Jul 2016 16:55:13 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #4, bug #48350 (project octave):

Wait, actually the long long type did work.  I forgot to change the explicit
cast from <int> to <long long>.  Here's what I see:


>> h = plot (15 + (5e-10 .* [1:70]'))
lo: 0  hi: 1
tick_sep: 0.2
i1=0, i2=5
lo: 0  hi: 1
tick_sep: 0.2
i1=0, i2=5
lo: 0  hi: 1
tick_sep: 0.2
i1=0, i2=5
lo: 0  hi: 1
tick_sep: 0.2
i1=0, i2=5
lo: 0  hi: 1
tick_sep: 0.2
i1=0, i2=5
lo: 0  hi: 70
tick_sep: 10
i1=0, i2=7
lo: 0  hi: 70
tick_sep: 10
i1=0, i2=7
lo: 15  hi: 15
tick_sep: 5e-09
i1=3000000000, i2=3000000007
lo: 15  hi: 15
tick_sep: 5e-09
i1=3000000000, i2=3000000007
h = -6.5041


So the attached patch works.  Again, it seems like there should be a better
approach that subtracts out the mean or "median integerized value", if you
follow what I'm saying.  I.e., so that i1 and i2 become 0 and 7.  Part of the
reason I say this is that the y-axis labels become meaningless--they all say
"15".  In gnuplot, something like:


gnuplot> set xrange
[15.0000000005000000413701854995:15.0000000349999993431993061677]
gnuplot> plot x


has y axis labels:

15.00000004
15.00000003
15.00000003
15.00000002
15.00000002
15.00000001
15.00000001
15.00000000

That's a little improvement, but still it seems one should be able to write
this as 15+##e-8 if you follow.

Anyway, the attached patch works, and I'm inclined to be content with it
because of how time-consuming it is to compile the project when the
graphics.cc file is touched.

PS: I can guess why the out-of-memory error message of the original bug.  In
the code is

  Matrix tmp_ticks (1, i2-i1+1);

when the i2 and i1 are bogus, it is probably trying to create some huge
matrix.

(file #37655)
    _______________________________________________________

Additional Item Attachment:

File name: octave-longlong_tick_vars-bug48350-djs2016jul01.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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