#1233 Volatile data

5.0
closed-invalid
nobody
None
5
2014-03-02
2013-04-18
Christoph Bersch
No

Hi,

as far as I understand the 'volatile' keyword (based on the linkedaxes demo), the following example should plot points and lines with the same data, but two different data sets are generated:

plot '<python -c "import numpy, sys; numpy.savetxt(sys.stdout, numpy.random.normal(size=(10,1)), delimiter=''\t'')"' volatile u 0:1 with points, '' volatile u 0:1 with lines

Should this work?

Christoph

Discussion

  • Ethan Merritt
    Ethan Merritt
    2013-04-18

    No. The volatile command does not prevent you from explicitly reading twice from the data source, which is what your command does. It does, however, allow you to reuse the existing data later if it hasn't been replaced by an intervening plot command.

    set style data points
    plot "... some long command" volatile
    set label 1 foo
    set obj 2 rectangle ...
    refresh

    The "refresh" command will see that the existing data came from a volatile source and reuse it in place rather than trying to read it again from the original source. But this time the plot will include added labels and objects.

     
  • Ethan Merritt
    Ethan Merritt
    2014-03-02

    • status: open --> closed-invalid