0

My dataset is something like this:

<timestamp> <value>

Value ranges from 0 to 500000. I'm using GNUplot to plot my data (X marks). I would like to split my value range (0-500000) to e.g. 5 main ranges and assign them a color (example: 0-100000 is green, 100001-200000 is blue, etc.).

This is the (plot) command I use now:

plot "data/${Y}${m}${d}_strikes" using 1:2 with points title "lightning strike"

I've read about creating a palette. Can anyone help please?

1 Answer 1

1

I've found a solution:

set yrange [0:500000]
set cbrange [0:500000]
set palette defined ( 0 "green", 50000 "blue", 100000 "orange", 400000 "red" )
plot "data/${Y}${m}${d}_strikes" using 1:2:2 with points title "lightning strike" linecolor palette
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.