Quantcast

Gnuplot doesnot give output if file exist

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Gnuplot doesnot give output if file exist

gnuuser4165
set term png
set output MainPlot.png
plot "ABC.dat"
plot "XYZ.dat"
Set output
set term pop

I see this generate plot MainPlot.png using ABC.dat but does not overwrite by XYZ.dat.
 
I have loop where I wanted to overwrite output on same file.

can Anyone help on this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

thse
gnuuser4165 <s416504 <at> yahoo.com> writes:

>
> set term png
> set output MainPlot.png
> plot "ABC.dat"
> plot "XYZ.dat"
> Set output
> set term pop
>
> I see this generate plot MainPlot.png using ABC.dat but does not overwrite
> by XYZ.dat.
>
> I have loop where I wanted to overwrite output on same file.
>
> can Anyone help on this?

if you would have a look into the file "MainPlot.png" with
a binary editor or viewer you would see that there are two
png-images written into this file one after the other.

because the png-format is a single image format (no animation)
an image display program stops after the first image (it reads
the "IEND" chunk), neglecting the second image.

if you want to overwrite the image, you have to close
("set output") and reopen the output file.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

gnuuser4165
Thanks for reply.
As you said It might appending same file .
I will certainy try your solution but.....

I have restarted program few times.
File size , date & time doesn't change after these restarts.
thse wrote
gnuuser4165 <s416504 <at> yahoo.com> writes:

>
> set term png
> set output MainPlot.png
> plot "ABC.dat"
> plot "XYZ.dat"
> Set output
> set term pop
>
> I see this generate plot MainPlot.png using ABC.dat but does not overwrite
> by XYZ.dat.
>
> I have loop where I wanted to overwrite output on same file.
>
> can Anyone help on this?

if you would have a look into the file "MainPlot.png" with
a binary editor or viewer you would see that there are two
png-images written into this file one after the other.

because the png-format is a single image format (no animation)
an image display program stops after the first image (it reads
the "IEND" chunk), neglecting the second image.

if you want to overwrite the image, you have to close
("set output") and reopen the output file.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

gnuuser4165
I did tried your suggestion but the result is same as old. If file exist, file not been overwritten or upended by set Output file name & plot command. It only work if I delete existing file before next output. Does anyone see different result? Any setting to Set Output file in Overwrite Mode ?
gnuuser4165 wrote
Thanks for reply. As you said It might appending same file . I will certainy try your solution but..... I have restarted program few times. File size , date & time doesn't change after these restarts.
thse wrote
gnuuser4165 yahoo.com> writes: > > set term png > set output MainPlot.png > plot "ABC.dat" > plot "XYZ.dat" > Set output > set term pop > > I see this generate plot MainPlot.png using ABC.dat but does not overwrite > by XYZ.dat. > > I have loop where I wanted to overwrite output on same file. > > can Anyone help on this? if you would have a look into the file "MainPlot.png" with a binary editor or viewer you would see that there are two png-images written into this file one after the other. because the png-format is a single image format (no animation) an image display program stops after the first image (it reads the "IEND" chunk), neglecting the second image. if you want to overwrite the image, you have to close ("set output") and reopen the output file. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ gnuplot-info mailing list [hidden email] Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

BBands
operating system?

     John

On Thu, Mar 20, 2014 at 5:17 PM, gnuuser4165 <[hidden email]> wrote:
> I did tried your suggestion but the result is same as old.If file exist, file
> not been overwritten or upended by set Output file name & plot command.It
> only work if I delete existing file before next output.Does anyone see
> different result? Any setting to Set Output file in Overwrite Mode ?

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

gnuuser4165
It's Windows 8 with Microsoft Visual Studio 12.

BBands wrote
operating system?

     John

On Thu, Mar 20, 2014 at 5:17 PM, gnuuser4165 <[hidden email]> wrote:
> I did tried your suggestion but the result is same as old.If file exist, file
> not been overwritten or upended by set Output file name & plot command.It
> only work if I delete existing file before next output.Does anyone see
> different result? Any setting to Set Output file in Overwrite Mode ?

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

BBands
Permissioning? Try a simple test.

set term png
set output "test.png"
plot sin(x)
set output
pwd

Now have a look in the directory pwd says gnuplot is using.

     John

On Thu, Mar 20, 2014 at 6:05 PM, gnuuser4165 <[hidden email]> wrote:
> It's Windows 8 with Microsoft Visual Studio 12.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

gnuuser4165
Thanks All. It is working. I see gnu Plot does create new file.
Confusion becuase It overwrite file  but does not update date & time.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

BBands
Not so sure that you should blame gnuplot. As far as I know, file date
and time stats are set by your OS. Windows 8 has has two date/time
fields, creation and modification. I'm guessing that you have your
view set to creation.

       John

On Thu, Mar 27, 2014 at 10:26 AM, gnuuser4165 <[hidden email]> wrote:
> Thanks All. It is working. I see gnu Plot does create new file.
> Confusion becuase It overwrite file  but does not update date & time.

------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gnuplot doesnot give output if file exist

gnuuser4165
I will check that & will let you know.
My program is reading input data & trying to plot output to file every second.

From: BBands [via Gnuplot] <[hidden email]>
To: gnuuser4165 <[hidden email]>
Sent: Thursday, March 27, 2014 2:07 PM
Subject: Re: Gnuplot doesnot give output if file exist

Not so sure that you should blame gnuplot. As far as I know, file date
and time stats are set by your OS. Windows 8 has has two date/time
fields, creation and modification. I'm guessing that you have your
view set to creation.

       John

On Thu, Mar 27, 2014 at 10:26 AM, gnuuser4165 <[hidden email]> wrote:
> Thanks All. It is working. I see gnu Plot does create new file.
> Confusion becuase It overwrite file  but does not update date & time.

------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]


If you reply to this email, your message will be added to the discussion below:
http://gnuplot.10905.n7.nabble.com/Gnuplot-doesnot-give-output-if-file-exist-tp18266p18304.html
To unsubscribe from Gnuplot doesnot give output if file exist, click here.
NAML


Loading...