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 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: References: 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 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"