0

Specifically, I want to set xtics using several specific values through the -e option, as like how we specify a parameter

gnuplot -e "param=1" script.gnuplot

But it returns the following error,

gnuplot -e "myxtics='(2,4,7,16)'" script.gnuplot

set xtics myxtics
                 ^
"script.gnuplot", line 58: increment must be positive

What should I do?

1 Answer 1

3

You can get gnuplot to explicitly handle the variable as a macro, so that it is expanded in the set command line as the very first thing. Just prefix the variable with @:

set xtics @myxtics
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.