Re: [AQT-dev] gnuplot -title option with AquaTerm
Brought to you by:
persquare
From: Joe K. <jko...@co...> - 2006-09-13 20:30:43
|
on 9/13/06 11:38 AM, Per Persson at per...@ma... wrote: > Just one more thing to try: > Put the following in a file e.g. gnuplot_aqua and make sure it is > executable. > Then point octave's gnuplot binary to that file. Does it work as > expected? > > #!/bin/sh > > TEMPFILE=`mktemp -t aqua_plot` > > # > # add option parsing, error checking, and support for more features > here... > # > echo "set term aqua title \"$2\"" > $TEMPFILE > cat >> $TEMPFILE > gnuplot < $TEMPFILE > # --- end of file ---- > > Keeping my fingers crossed, > Per Per, Not there yet, but we're making progress. I created the script gnuplot_aqua and placed it in /usr/local/bin where the gnuplot-4.0 executable also resides (I have two gnuplots: gnuplot-4.0 in /usr/local/bin and gnuplot-4.1 as /Tools/gnuplot-4.1/bin/gnuplot. I control which is used with a gnuplot symlink.) I did a sudo chmod +x gnuplot_aqua in /usr/local/bin and checked to make sure I had x in the permissions. Then I started a new terminal shell, did an export GNUTERM=gnuplot_aqua, and started octave-2.9.8. When I tried plot(rand(1,10)); in octave I got an error: "Unknown or ambiguous terminal name 'gnuplot_aqua'" and no plot appeared. So I exited octave, and did a gnuplot_aqua < gnuspect.inp, where gnuspect.inp is a working gnuplot script. I got the same error message, followed by the correct plot, but with Figure 1 as the title. gnuplot_aqua did successfully invoke gnuplot-4.1, but did not change the title. My fear is that the octave plot process proceeds in several steps, i. e., it opens a new plot stream with gnuplot -title ... , then follows with other plot instructions before finally closing the plot stream with a final set of plot instructions. There are two new replacement routines for gset called __gnuplot_raw__ and __gnuplot_set__ that allow a knowledgeable user to pass instructions (font, line type and width, etc.) to gnuplot while the plot is being set. I don't fully understand your script syntax, but I assume you are trying to capture the title as it is passed to gnuplot. That could lead us back to just placing a set term aqua somewhere in the existing plot structure. I hope I'm clear and followed your instructions correctly. Just let me know if I need to try some other things. Joe |