Gnuplot minimum and maximum boundaries for autoscaling

前端 未结 4 841
佛祖请我去吃肉
佛祖请我去吃肉 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:30

    Since people seem to be interested in this question, I'll add the way I solved this as an answer:

    I made the minimum for the autoscaling by inserting a invisible marker in the beginning of the data. That cause the plot to always "show" it, even though it can not bee seen.

    Then I implemented the maximum outside of gnuplot (propably could have been possible inside it as well, take a look at mgilson's answer), in a parser script that I have used to prepare the data for gnuplot.

    Actually in the script I took all the "clipped out" values, added them to y=0, and made them red. That way I get a "warning", of values being too big to be sensible to graph. (My program monitors pings between two hosts, and there is no sense trying to graph 5s+ latencies => I mark it as connection broken)

提交回复
热议问题