saving plot as png file from script

88 views
Skip to first unread message

niv levy

unread,
Mar 3, 2010, 6:27:00 AM3/3/10
to fityk-users
Hi,
is it possible to save the plot as a png file without using the gui,
i.e by issuing a command in the script?
I couldn't find anything in the mailing list archive or on google.
thanks,
niv

Marcin Wojdyr

unread,
Mar 3, 2010, 9:07:53 AM3/3/10
to fityk...@googlegroups.com
On Wed, Mar 3, 2010 at 12:27, niv levy <nivl...@gmail.com> wrote:
> Hi,
> is it possible to save the plot as a png file without using the gui,
> i.e by issuing a command in the script?

No, and this feature is not easy to add, because the engine that
executes scripts can't render plots. Plots are handled by the GUI part
of the program.

Marcin

--
Marcin Wojdyr | http://www.unipress.waw.pl/~wojdyr/

tzo...@physics.uoc.gr

unread,
Jan 7, 2017, 7:10:57 PM1/7/17
to fityk-users
Hi Marcin
I guess you must have improved this because I can use the command:

@5: plot > '161221-135528_12MeVNeGTSfit.png'

to produce the file 161221-135528_12MeVNeGTSfit.png in the working directory

so it works!

But I'm not sure how I can get two or more datas to display and then do the same. 
Instead I can only do it manually with the cursor pointing to the data files I want to plot and displaying them in the GUI after which I can just give a plot command with a redirect to a png file and this works.
But I need to do it by script not by hand!!
I'm not sure what the @*: plot exactly does? 
it didn't seem to work properly! 


Any suggestions? Thanks in advance

Marcin Wojdyr

unread,
Jan 7, 2017, 8:35:48 PM1/7/17
to fityk...@googlegroups.com
On 8 January 2017 at 00:10, <tzo...@physics.uoc.gr> wrote:
> Hi Marcin
> I guess you must have improved this because I can use the command:
>
> @5: plot > '161221-135528_12MeVNeGTSfit.png'

yes, but it works only when run in GUI

> But I'm not sure how I can get two or more datas to display and then do the
> same.

It is using current settings of your GUI and draws datasets that are
visible on the screen.
If you select "show all datasets" (sidebar on the right) then all
datasets will be drawn together.
But then you probably need to change colors of datasets.

Is this what you had in mind, or you'd rather save one picture per dataset?

> I'm not sure what the @*: plot exactly does?

@* is a general mechanism to iterate over all datasets.
It's not useful in combination with some commands.

Best,
Marcin
Reply all
Reply to author
Forward
0 new messages