Gnuplot minimum and maximum boundaries for autoscaling

前端 未结 4 856
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-31 09:05

How can I limit the autoscaling of gnuplot, so that, as example for the y-max, it is at least a certain value and it would autoscale up to fixed \"limit\"?

From loo

4条回答
  •  粉色の甜心
    2020-12-31 09:23

    Since version 4.6 gnuplot offers a new syntax to specify upper and lower limits for the autoscaling. For your case you could use

    set xrange [0:100 < * < 1000]
    

    Quoting from the documentation:

    The range in which autoscaling is being performed may be limited by a lower bound or an upper bound or both. The syntax is

    {  < } * { <  }
    

    For example

    0 < * < 200
    

    sets = 0 and = 200.

    That syntax can be applied to both the minimum or maximum value of set *range.

    To autoscale xmin but keeping it positive, use

    set xrange [0<*:]
    

    To autoscale x but keep minimum range of 10 to 50:

    set xrange [*<10:50<*]
    

    See the documentation about set xrange for more information.

提交回复
热议问题