here is the Image I need to get finallyI was making a movie for the code I have written in C using gnuplot. I have to set many rectangles in the window at each instant of time (from x1,y1 to x2,y2) and I have this configurations in different files.. config_00.txt, config_10.txt, config_20.txt, etc.. at times 0,10,20, etc.. each of which have 4 columns x1,y1,x2,y2. How can I do this ?. If my file was storing only x and y, and If i need to draw a line only I could have written "plot 'config_10.txt' only.. But here that's not the case.. I need to scan each line of each file and set objects at possitions that line does say.. I saw something like "call" in gnuplot.. but I could't understand please help.. I may write a program to scan each files(which stores configuration at different times) and set objects.. then unset again set from next file but it looks tedious.. for ploting data points in a file with x,y columns we can just say plot "file.txt" u 1:2... but i was asking whether there is something like "from file_10.txt set object rectangle from $1,$2 to $3,$4
After setting those objects, to see the configuration i used to plot something like plot 0.. so gnuplot shows me my configuration
You can plot a rectangle from a single line of input using the plot style "boxxyerror". For data lines containing four numbers x1, y1, x2, y2 decribing two corners of a rectangle:
set style fill solid
plot 'data' using 1:2:1:3:2:4 with boxxy
The rectangle can be described in several ways via the using
specifier. This command shows format x:y:xlow:xhigh:ylow:yhigh. If you have many separate data files and want them all on the same plot then add an iteration clause:
plot for [i=0:20] sprintf("config_%02d.txt", i) using 1:2:1:3:2:4 with boxxy