working directory for gnuplot

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

working directory for gnuplot

Mario Storti-3

Hi all!

I have the following problem when using the gplot command. If I
change directory during the Octave session, then commands like:

gplot "myfile"

doesn't work because it seems that gnuplot doesn't track the change of
directory. I ask if someone else has found this, and if there is a
workaround/fix/patch.

Mario

%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%
Mario Alberto Storti               | Fax: (54)(42) 55.09.44               |
Grupo de Tecnologia Mecanica       | Tel: (54)(42) 55.91.75               |
INTEC, Guemes 3450 - 3000 Santa Fe | http://venus.unl.edu.ar/gtm-eng.html |
Argentina                          | Home: Gob. Vera 3161                 |
Reply: [hidden email]  |       (54)(42) 55.00.23              |



Reply | Threaded
Open this post in threaded view
|

Re: working directory for gnuplot

Heber Farnsworth
On Tue, 26 Nov 1996, Mario Storti wrote:

>
> Hi all!
>
> I have the following problem when using the gplot command. If I
> change directory during the Octave session, then commands like:
>
> gplot "myfile"
>
> doesn't work because it seems that gnuplot doesn't track the change of
> directory. I ask if someone else has found this, and if there is a
> workaround/fix/patch.

The simplest workaround I can think of is to load the data in myfile into
a matrix.  If you just want to plot data in a file you don't need Octave
at all.  Octave plotting commands are designed for plotting vectors or
matrices in the workspace.


>
> Mario
>

  Heber Farnsworth                               | Department of Finance
  Univerity of Washington                        | Box 353200
  tele:  (206) 528-0793 home                     | Seattle, WA 98195-3200
  tele:  (206) 543-4773 finance     web: http://weber.u.washington.edu/~heberf
  fax:   (206) 685-9392             email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: working directory for gnuplot

Dutt, Vinayak, Ph.D.
In reply to this post by Mario Storti-3
#>
#> I have the following problem when using the gplot command. If I
#> change directory during the Octave session, then commands like:
#>
#> gplot "myfile"
#>
#> doesn't work because it seems that gnuplot doesn't track the change of
#> directory. I ask if someone else has found this, and if there is a
#> workaround/fix/patch.


I guess best fix for it would be to fix the octave cd command such that it
would run cd command on gnuplot also if gnuplot was running.

I have not tried this myself, but running "closeplot" command before the gplot
command could also fix the cd command problem. "closeplot" closes the gplot
pipe and hence next gplot command should start a new pipe to gnuplot which would
hopefully be started in the correct directory.



Vinayak Dutt

Ultrasound Research
Mayo Clinic
Rochester MN 55905
E-Mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: working directory for gnuplot

Mario Storti-3
In reply to this post by Heber Farnsworth

>>>>> On Tue, 26 Nov 1996 12:42:43 -0800 (PST),
       Heber Farnsworth <[hidden email]> said:


> On Tue, 26 Nov 1996, Mario Storti wrote:
>
> >
> > Hi all!
> >
> > I have the following problem when using the gplot command. If I
> > change directory during the Octave session, then commands like:
> >
> > gplot "myfile"
> >
> > doesn't work because it seems that gnuplot doesn't track the change of
> > directory. I ask if someone else has found this, and if there is a
> > workaround/fix/patch.
>
> The simplest workaround I can think of is to load the data in myfile into
> a matrix.  If you just want to plot data in a file you don't need Octave
> at all.  Octave plotting commands are designed for plotting vectors or
> matrices in the workspace.

I'm working with finite element meshes. I make them in Octave. To plot
them, the  contour of each "finite element"  is  a curve  with 4  or 5
points depending if the element is a  triangle o quadrangle, so that I
have  to plot  a   lot of  curves,   let's  say 5,000 curves   (finite
elements). Now,  the "matlab-style" plot commands  have the problem of
not allowing more  than  a limited number   of curves. So that  I  use
directly gplot for plotting meshes.

>
>
> >
> > Mario
> >
>
>   Heber Farnsworth                               | Department of Finance
>   Univerity of Washington                        | Box 353200
>   tele:  (206) 528-0793 home                     | Seattle, WA 98195-3200
>   tele:  (206) 543-4773 finance     web: http://weber.u.washington.edu/~heberf
>   fax:   (206) 685-9392             email: [hidden email]
>

>>>>> Tue, 26 Nov 1996 14:54:04 -0600"Dutt, Vinayak, Ph.D." <[hidden email]> (Vinayak Dutt)


> I guess best fix for it would be to fix the octave cd command such that it
> would run cd command on gnuplot also if gnuplot was running.
>
> I have not tried this myself, but running "closeplot" command before the gplot
> command could also fix the cd command problem. "closeplot" closes the gplot
> pipe and hence next gplot command should start a new pipe to gnuplot which would
> hopefully be started in the correct directory.
>
>
>
> Vinayak Dutt
>
> Ultrasound Research
> Mayo Clinic
> Rochester MN 55905
> E-Mail: [hidden email]

Yes!! That fixed the problem. Thanks!!!!

Mario

%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%
Mario Alberto Storti               | Fax: (54)(42) 55.09.44               |
Grupo de Tecnologia Mecanica       | Tel: (54)(42) 55.91.75               |
INTEC, Guemes 3450 - 3000 Santa Fe | http://venus.unl.edu.ar/gtm-eng.html |
Argentina                          | Home: Gob. Vera 3161                 |
Reply: [hidden email]  |       (54)(42) 55.00.23              |

Reply | Threaded
Open this post in threaded view
|

Re: working directory for gnuplot

John W. Eaton-6
In reply to this post by Dutt, Vinayak, Ph.D.
On 26-Nov-1996, Vinayak Dutt <[hidden email]> wrote:

: #> I have the following problem when using the gplot command. If I
: #> change directory during the Octave session, then commands like:
: #>
: #> gplot "myfile"
: #>
: #> doesn't work because it seems that gnuplot doesn't track the change of
: #> directory. I ask if someone else has found this, and if there is a
: #> workaround/fix/patch.
:
: I guess best fix for it would be to fix the octave cd command such that it
: would run cd command on gnuplot also if gnuplot was running.

This fix has already been implemented for 2.0 and seems to work
correctly in the test releases.

Thanks,

jwe