Hi,
I am using gnuplot version 4.0.
I am accessing gnuplot functions in a C program by using an interface
program gnuplot_i.c.
I want to plot multiple curves in a single graph. And I want to put
such multiple graphs on a single page and write the output to a png
file.
When I am plotting multiple equations (e.g. sin(x)) in a single graph
and then putting such multiple graphs on a single page, it's working
fine.
But when I am plotting curves using gnuplot_plot_xy() in a single graph
and then putting such multiple graphs on a single page, then there is an
overlapping. i.e. The first graph is plotted correctly. When I am trying
to plot the second graph, it is plotting the data for first graph, as
well as the data for second graph. For third graph, it is plotting data
for first + second + third. and so on.
What I have tried is as follows:
I am trying to plot 2 graphs on a single page. so I have specified the
size of each graph as (0.5, 1).
Then for each graph, I am changing the origin. (0, 0) (0.5, 0)
Attached is the program I have tried (test_graph.c), along with the
gnuplot_i files that i have used.
But putting these multiple graphs in different files gives me the
expected output.
Is it some buffering problem ? Do I need to flush the data of graph1 and
then plot graph2?
Waiting for your reply....
Thanks & Regards,
Aniket
[ Please CC me as i am not subscribed to the list ]
|