------art_23392_9378749.1154652942307
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 8/4/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
>
> > I'm on windows :)  I don't need root.  Ohhh gives me goosebumps ;)
> >
> > The problem isn't that the file isn't created.  It's just that I don't
> know
> > when it's finished being written.
> >
> > I want to incorporate this into an app but I don't want to go trying to
> grab
> > the image if it doenst exist yet.
> >
> > I'm not quite sure how your using PNG in your code above.  Is this a
> > constant of gnuplot?
> >
>
> ??  it's set to the first command line parameter
>
>    >>      harp:~ > cat a.rb
>    >>      require 'rubygems'
>    >>      require 'gnuplot'
>    >>
>    >>      PNG  RGV.shift || 'test.png'
>
> it can be anything you like.
>
>
> you have one of two problems:
>
>    - /test2.png is being interpreted as some sort of switch.  definitely
> try
>      without the leading slash - that's a bizarre filename anyhow...
>
>    - the gnuplot exe is not being found in your PATH.  search the archives
> -
>      i've solved this one before.
>
> regards.
>
> -a
> --
> happiness is not something ready-made.  it comes from your own actions.
> - h.h. the 14th dali lama


Sorry Ara, I must be really thick at this because I don't understand, except
the PNG part...  whoops ;)

The chart is created, so the exe is found and executed.

/test2.png, bizarre as it is, is created correctly at c:\test2.png and I can
open it no problem once its written.

The issue is that when I call make_chart and then immediately try to do
something with c:\test2.png it doesn't exist yet.  I need to wait for it to
be written.

eg
make_chart
chart_file  ile.open( 'c:/test2.png' ) #< raises and exception because the
file does not yet exist

I would have thought that since Gnuplot.open has IO::popen as it's last
statement it would return some kind of IO object, but it returns a
Gnuplot::Plot object.

Sorry if I'm going around circles.  I appreciate your help with this.

Daniel

------art_23392_9378749.1154652942307--