Quantcast

How to link logarithmic axes?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to link logarithmic axes?

theozh
Hello,

while trying to link logarithmic axes, I get unexpected results.
The y and y2 axis should be e.g. just shifted by two orders of magnitude.

So, I thought that the following command would do it.

set link y2 via y*0.01 inverse y*100

However, that's not what I get. See copy&paste example below.
Although, it seems to work on linear scale.

How can I do it with logarithmic axes properly?
I am missing anything?
Thanks for any hints.


# link logarithmic axes
reset
set multiplot layout 2,1
set xrange [-12:2]

set logscale y
set ytics format "%g" nomirror
set grid ytics
set yrange [1e-12:0.01]

set logscale y2
set y2tics format "%g" nomirror

set link y2 via y*0.01 inverse y*100

plot 10**x axis x1y1, 10**x axis x1y2
unset logscale y
unset logscale y2
replot
unset multiplot






------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link logarithmic axes?

Ethan A Merritt-2
linked axes are not compatible with log scale

On Mon, Jul 11, 2016 at 12:56 PM, theozh <[hidden email]> wrote:

> Hello,
>
> while trying to link logarithmic axes, I get unexpected results.
> The y and y2 axis should be e.g. just shifted by two orders of magnitude.
>
> So, I thought that the following command would do it.
>
> set link y2 via y*0.01 inverse y*100
>
> However, that's not what I get. See copy&paste example below.
> Although, it seems to work on linear scale.
>
> How can I do it with logarithmic axes properly?
> I am missing anything?
> Thanks for any hints.
>
>
> # link logarithmic axes
> reset
> set multiplot layout 2,1
> set xrange [-12:2]
>
> set logscale y
> set ytics format "%g" nomirror
> set grid ytics
> set yrange [1e-12:0.01]
>
> set logscale y2
> set y2tics format "%g" nomirror
>
> set link y2 via y*0.01 inverse y*100
>
> plot 10**x axis x1y1, 10**x axis x1y2
> unset logscale y
> unset logscale y2
> replot
> unset multiplot
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> gnuplot-info mailing list
> [hidden email]
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link logarithmic axes?

theozh
> linked axes are not compatible with log scale
>
That's unfortunate.
I do not have enough insight into gnuplot why it should not be possible
for logscale.
However, for a simple relative "linked" shift of the log axes the
following should be a workaround using the gnuplot variables GPVAL_Y_MIN
and GPVAL_Y_MAX


##### "link" logarithmic axes
reset

Offset = 0.01  # Log y and axes offset

set xrange [-12:2]

set logscale y
set ytics format "%g" nomirror
set grid ytics
set yrange [*:*]

set logscale y2
set y2tics format "%g" nomirror
set y2range [GPVAL_Y_MIN*Offset:GPVAL_Y_MAX*Offset]

plot 10**x axis x1y1, 10**x axis x1y2
replot        # obviously it needs replot to update the GPVAL values?!



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link logarithmic axes?

theozh
In reply to this post by Ethan A Merritt-2
> linked axes are not compatible with log scale
>
That's unfortunate.
I do not have enough insight into gnuplot why it should not be possible
for logscale.
However, for a simple relative "linked" shift of the log axes the
following should be a workaround using the gnuplot variables GPVAL_Y_MIN
and GPVAL_Y_MAX


##### "link" logarithmic axes
reset

Offset = 0.01  # Log y and y2 axes offset

set xrange [-12:2]

set logscale y
set ytics format "%g" nomirror
set grid ytics
set yrange [*:*]

set logscale y2
set y2tics format "%g" nomirror
set y2range [GPVAL_Y_MIN*Offset:GPVAL_Y_MAX*Offset]

plot 10**x axis x1y1, 10**x axis x1y2
replot        # obviously it needs replot to update the GPVAL values?!


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Loading...