dkogan / feedgnuplot

Tool to plot realtime and stored data from the commandline, using gnuplot.
Other
707 stars 37 forks source link

Limit xrange when using xlen #6

Closed a3nm closed 11 years ago

a3nm commented 13 years ago

Hi,

Here's a very simple fix to avoid the fact that, when using xlen, the plot is initially mostly empty. It seems more logical (at least for what I'm doing) to have its xrange be initially small and grow up to xlen.

What do you think about this? Maybe the best would be to have an option to choose between the two possible behaviors?

Cheers,

Antoine

dkogan commented 13 years ago

Hi Antoine. This patch is too much of a special case so I don't want to merge it in as is. Another option could work, though. In your particular case do you essentially want

plotwidth = min(xlen, data_xmax - data_xmin)

Here the plot will never be wider than xlen, and will shrink to maximally show the existing data, if this is less than xlen. This is different from your proposal since it won't just kick in at the start; if there's a hole in the data later on, it will expand the plot then also. Is this what you want, or do you only want an expanded plot at the start, when the data is filling in?

dkogan commented 11 years ago

This is old, and I'm not a huge fan of the proposed behavior, so I'm closing this.