|
From: BBands <bb...@gm...> - 2013-01-24 16:40:52
|
That sort of approach is often useful in plotting certain types of
technical analysis indicators. One way I have seen that done is to
pick a pair arbitrary cutoff points near zero. You could try Googling
for John McGinley. He wrote on the subject back in the 1980s. His
solution was to plot a small slice of the chart just above and below
zero with a linear scale. I add a hatch to the region to make the
discontinuity clear. I haven't tried this in gnuplot, but Ethan
Merritt demoed some tricks using the ternary operator that should make
it doable.
John Bollinger
On Thu, Jan 24, 2013 at 7:46 AM, somesh <som...@gm...> wrote:
> Hi,
>
> I have a data file like this:
> #x y
> 1 34
> 2 450
> 3 -987
> 4 20045
> 5 -1003
> 6 -30
>
> For only positive values, just "logscale y" is fine.
> For only negative values, I can use a reversed logscale:
> --
> set logscale y
> set yrange [ymin:ymax] reverse
> plot file u 1:(-$2) axis x1y1 t "Y" w linespoints
> --
>
> But how do I plot both positive and negative values in same plot?
> I want to place the x axis at the center of y axis; positive log scale (for
> positive values) above the x axis, and reversed logscale (for negative
> values) below the x axis.
>
> Is it possible?
>
> Thanks,
> Somesh
>
>
>
> --
> View this message in context: http://gnuplot.10905.n7.nabble.com/Both-positive-and-negative-log-y-axis-in-same-plot-tp17082.html
> Sent from the Gnuplot - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
--
John Bollinger
www.BollingerBands.com
|