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


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

Re: Always include zero in range

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
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 Wed, 22 Feb 2012 08:16:27 -0800
Organization gnuplot development team
Lines 21
Message-ID <ji34cu$ra0$1@dont-email.me> (permalink)
References <bb4a40f9-b8cd-4c97-8858-e48f744d5c8c@n12g2000yqb.googlegroups.com>
Reply-To sfeam@users.sourceforge.net
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
Injection-Date Wed, 22 Feb 2012 16:16:31 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="3mhAfh4CeAIeL3OKnPexDA"; logging-data="27968"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4PkgsuQWWgxxRKYigTQne"
User-Agent KNode/4.4.9
Cancel-Lock sha1:LpyIU5GwSsYO6OIrZ13hutiiD0M=
Xref x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:960

Followups directed to: comp.graphics.apps.gnuplot

Show key headers only | 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