감동, 마음이 움직이는 것

[gnuplot] for loop & obj (circle, rec) 본문

Tips (Utility, Computer Language, and etc.)

[gnuplot] for loop & obj (circle, rec)

Struggler J. 2018. 12. 13. 00:24

1. object (circle or rec)

set object circle 

set object rec

http://gnuplot.sourceforge.net/demo/circles.html



2. file name for loop

https://stackoverflow.com/questions/25257202/how-to-define-a-gnuplot-output-file-as-a-variable

set palette defined ( -1 "blue", 0 "#999999", 1 "red" ) 

p for [i=10:90] g = 0.01*i  sprintf('test_%g', g) u 1:3:g w l lc palette   t ''



3. define palette

http://gnuplot.sourceforge.net/demo/pm3dcolors.html

set palette defined ( 0 "green", 1 "blue", 2 "red", 3 "orange" )



4. line color from variable


plot 'test.txt' u 1:2:2 w l lc palette