From octave-maintainers-request at bevo dot che dot wisc dot edu Wed Jan 28 20:52:22 2004 Subject: Re: contour plots and doing graphics in octave From: Paul Kienzle To: Donald J Bindner Cc: octave-maintainers at bevo dot che dot wisc dot edu Date: Wed, 28 Jan 2004 21:51:03 -0500 Ideally you should create a routine which returns the lines you want to draw, and leave it to another routine to do the plotting. That allows flexibility in choosing a plotting package. If you need to do the plotting from C++, I would recommend using feval to call the usual plot scripts rather trying to tie directly into the stream. Something like: #include ... octave_value_list in; in(2) = "x;my line;"; in(1) = Y; in(0) = X; feval("plot",in,0); // nargout==0 Paul Kienzle pkienzle at users dot sf dot net On Jan 28, 2004, at 4:48 PM, Donald J Bindner wrote: > > My question in a nutshell is this. From a dynamically linked > function, how do I create graphics? There is a > send_to_plot_stream() in pt-plot.cc but its symbol is not > exported, except through the graw() function. I see that there > are structures, tree_plot_command, etc., but I don't understand > what to do with them. And I can't seem to trace from plot.m -> > __plt__.m --> __plt2__.m --> to the point where it interfaces > with the C++ code.