|
From: <Die...@t-...> - 2004-08-08 21:01:17
|
Dear Durga,
you have several options. As far as I understand you already wrote the data=
=20
you want to plot in two columns in one file, I'll call that one "data.dat".
Then you want to specify some options for formatting.
One way to do this is:
=2D make a subroutine writing the commands you want to use to format the ou=
tput=20
into some parameter file (call it "data.plt")
It might look like:
// start file=20
#
# parameterfile for gnuplot, to plot data.dat
# generated by <me> on <date>
#
set xrange[0:100]
set yrange[0.01:10]
set logscale x
set nokey
set grid
# put here whatever you want to do!
plot "c:/<MYPATH/data.dat
pause -1
#
# end
#
// end file
This may easily be enlarged as you might want it to. Please watch out that =
the=20
latest gnuplot versions (4.0 at least) should be configured using a differe=
nt=20
format. It should say "unset key" rather than "set nokey" for example. But=
=20
currently both formats are acceptable.
=2D make a call to gnuplot:
char gnuplotcmd[256];
strcpy(&gnuplotcmd[0], "wgnuplot c:/<MYPATH>/data.plt");
system(gnuplotcmd);
This is old C-style but ought to work with c++. You have to know the name o=
f=20
your gnuplot-binary (I had had different ones so far in M$) and you should=
=20
think about the path to place your data- and plt-files.
Hope this helps,
take care
Dieter
P.S.: please do not send html-mails any more.
Am Sonntag, 8. August 2004 00:45 schrieb krishnakanth durga dodda:
> <P>
> <BR>
> hello,<BR>
> <BR>
> I am Durga Krishna Kanth Dodda Studying Masters in<BR>
> computational enginerring. So as a part of my project I have to draw<BR>
> graphs .So i want it to implement in C++ so please help me with this how =
to
****
=2D-=20
=2D----------------------------------------------------------
|
\
/\_/\ |
| ~x~ |/-----\ /
\ /- \_/
^^__ _ / _ ____ /
<=B0=B0__ \- \_/ | |/ | |
|| || _| _| _| _|
if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
=2D----------------------------------------------------------
|