Here is an example data set.
#x y r c
1 2 10 2
3 1 2 4
3 2 1 5
I can plot with circle's radius representing the 3rd column OR with color representing the 3rd column. However, I don't know how to keep them both in the plot.
Here is my code to plot with radius representing the 3rd column.
plot 'rslt.log' u 1:2:3 w points pt 7 ps variable
Try:
plot 'rslt.log' u 1:2:3:4 w points pt 7 ps variable lc palette
An alternative is:
plot 'test.dat' u 1:2:3:4 w p pt 7 ps variable lc variable
or using the circles linestyle:
plot 'test.dat' u 1:2:3:4 w circles linecolor variable
If you want solid filled circles:
plot 'test.dat' u 1:2:3:4 w circles linecolor variable fillstyle solid
For any of the above, you can substitute linecolor variable
with linecolor palette
as suggested by @andyras. The difference is that palette
maps a floating point number onto the palette whereas variable
maps the integer to a linestyle which has a color associated with it.
With ps variable
the number in the associated column becomes a multiplicative factor which increases the default size of the point. With circles you have the freedom to specify the exact size of the circle (as the radius) -- Although I'm not 100% sure which axis is used in the common case where the aspect ratio of your plot isn't 1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With