Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2345
| From | Janis Papanagnou <janis_papanagnou@hotmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Major and minor ticks artifact |
| Date | 2014-03-14 23:54 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <lg01bh$dlr$1@speranza.aioe.org> (permalink) |
| References | <levp7j$tvo$1@speranza.aioe.org> <bnhe21F5utsU1@mid.dfncis.de> |
On 02.03.2014 20:10, Hans-Bernhard Bröker wrote: > On 02.03.2014 18:19, Janis Papanagnou wrote: >> I noticed an ugly artifact that at on place a minor tic is unnecessarily >> displayed, and even straight *besides* the major tic. This was with a png >> term definition set term png size 800,600 . If I change that definition >> to set term png size 800,599 the artifact disappears. It's, yet again, >> a work-around. >> >> Is that how gnuplot works and how experienced people "solve" such issues, >> or is there any better approach? > > How is anyone supposed to be able to answer that if you didn't even start > to describe what you actually did in gnuplot to get this effect? I am sorry that I didn't expand on details of the code. I was hoping that such an observation - meanwhile I'd just call it a bug[*] - is well known, so that there's already some standard hint to that. (Has that really never been observed before? Hard to believe, but anyway.) What I did was defining a y-axis range with major tics=1 and minor tics=0.1 resolution, or, if you prefer actual code... set ytics 10 set mytics 2 set y2tics 1 set my2tics 10 The range of the y2 axis (where I observed the artifact) was defined as set y2r [0:6] As said, I used a workaround to adjust the png size so that the rounding issues - as far as I suspect - eliminate each other. (Still can't believe, though, that this is how such elementary problems are to be countered with gnuplot.) Thanks. Janis [*] I have a quite good idea how this type of bug is reflected in gnuplot (or other application's) implementations.[**] (You can probably find it in "What Every Computer Scientist Should Know About Floating-Point Arithmetic".) What I'm wondering about, though, is that such an effect is observable in such a long time existing tool. [**] Use the following code for various values (besides 0.1, e.g. 0.2, 0.25, 0.5, 0.05) and observe the final values i=0.0 ; while (i<1.0) i += 0.1 ; print i many tools will not print 1.0 for an increment of 0.1, but, as expected, will print 1.0 for all the other values that I suggested above. There are of course various possibilities to avoid such FP problems if incrementing FP numbers in loops would not be done as primitive as depicted.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Major and minor ticks artifact Janis Papanagnou <janis_papanagnou@hotmail.com> - 2014-03-02 18:19 +0100
Re: Major and minor ticks artifact Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-03-02 20:10 +0100
Re: Major and minor ticks artifact Janis Papanagnou <janis_papanagnou@hotmail.com> - 2014-03-14 23:54 +0100
Re: Major and minor ticks artifact sfeam <sfeam@users.sourceforge.net> - 2014-03-14 22:17 -0700
Re: Major and minor ticks artifact Janis Papanagnou <janis_papanagnou@hotmail.com> - 2014-03-15 10:54 +0100
Re: Major and minor ticks artifact Karl <mail.kfr@gmx.net> - 2014-03-18 18:38 +0100
Re: Major and minor ticks artifact Hermann Peifer <peifer@gmx.eu> - 2014-03-20 07:10 +0100
Re: Major and minor ticks artifact Hermann Peifer <peifer@gmx.eu> - 2014-03-15 13:27 +0100
Re: Major and minor ticks artifact Janis Papanagnou <janis_papanagnou@hotmail.com> - 2014-03-15 23:02 +0100
Re: Major and minor ticks artifact Hermann Peifer <peifer@gmx.eu> - 2014-03-16 01:54 +0100
Re: Major and minor ticks artifact Janis Papanagnou <janis_papanagnou@hotmail.com> - 2014-03-21 05:52 +0100
Re: Major and minor ticks artifact Dan Luecking <LookInSig@uark.edu> - 2014-03-20 12:24 -0500
Re: Major and minor ticks artifact Janis Papanagnou <janis_papanagnou@hotmail.com> - 2014-03-21 05:54 +0100
csiph-web