0

I'm actually plotting in C++ using a pipe, but a command line demo represents the confusion:

> plot '-' matrix with image
> 1 2
> 3 4
> e
> e

Nothing happens after the first 'e', but the plot comes after the second. What does this mean?

And BTW, is there a way to set palette to grey on the same line (since I'm chaining multiple plot types together).

Mastiff
  • 2,101
  • 2
  • 23
  • 38

1 Answers1

1

Only one e should be required. If I save your script (with one e) into a file and then pipe it Gnuplot, it generates the plot as expected. I suppose the issue must be related to the way how you provide the data. For example is the newline after the first e correctly flushed to the output?

As for the palette, you can provide the command on the same line as the plot command if you delimit them with a semicolon:

set palette gray; plot '-' matrix with image
1 2
3 4
e
ewcz
  • 12,819
  • 1
  • 25
  • 47
  • 1
    Is it different at the prompt? I found a few other places with two e's, though the don't explain why it is needed, for example: http://soc.if.usp.br/manual/gnuplot-doc/htmldocs/image.html – Mastiff Oct 27 '18 at 14:56