Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #960

Re: Always include zero in range

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Always include zero in range
Followup-To comp.graphics.apps.gnuplot
Date 2012-02-22 08:16 -0800
Organization gnuplot development team
Message-ID <ji34cu$ra0$1@dont-email.me> (permalink)
References <bb4a40f9-b8cd-4c97-8858-e48f744d5c8c@n12g2000yqb.googlegroups.com>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


James wrote:

> I'm currently using gnuplot 4.4.
> 
> I want my yrange to always include zero.  Sometimes my data will be
> all positive, sometimes all negative, and sometimes a mix.
> 
> So I want the yrange to be:
> [0:*] when the data is all positive,
> [*:0] when the data is all negative,
> and [*:*] when the data has mixed signs.
> 
> I can already accomplish this with data processing outside of
> gnuplot.  Is there an easy way to do it within gnuplot?

You could draw an extra line at y=0 so that it is included in the scaling.
If you are drawing the axis anyway, this would be hidden behind it.
If you are not drawing the axis, you could make it unobtrusive by making
the line color the same as the backgound
   plot 0 lt -3 notitle,   "realdata"

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Always include zero in range James <jjpuzzles@wowway.com> - 2012-02-22 07:15 -0800
  Re: Always include zero in range sfeam <sfeam@users.sourceforge.net> - 2012-02-22 08:16 -0800
    Re: Always include zero in range James <jjpuzzles@wowway.com> - 2012-02-22 10:00 -0800

csiph-web