Printing Plots

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

Printing Plots

harish3679
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Printing Plots

siko1056
On Sat, Jul 21, 2018 at 1:13 PM harish3679 <[hidden email]> wrote:
Hello Folks!!

When I try to print this plot x=plot(1:10) using the command

print -dpng 'x.png'

It is popping this error

"error: print: no figure to print
error: called from
    print at line 347 column 5"

Any corrections on my part would be appreciated

Thanks!!
Harish


Dear Harish,

Do you close the resulting plot window, when running the following command?

   x = plot(1:10)

This assignment does not save the plot data to x.  After running this command x is only an handle to the plot, that becomes invalid after closing the corresponding window.

Thus leave the window open and run the print command.

HTH,
Kai


Reply | Threaded
Open this post in threaded view
|

Re: Printing Plots

harish3679
Yes, that's correct. Can I use the hold on command instead??

On Sun, Jul 22, 2018, 06:47 Kai Torben Ohlhus <[hidden email]> wrote:
On Sat, Jul 21, 2018 at 1:13 PM harish3679 <[hidden email]> wrote:
Hello Folks!!

When I try to print this plot x=plot(1:10) using the command

print -dpng 'x.png'

It is popping this error

"error: print: no figure to print
error: called from
    print at line 347 column 5"

Any corrections on my part would be appreciated

Thanks!!
Harish


Dear Harish,

Do you close the resulting plot window, when running the following command?

   x = plot(1:10)

This assignment does not save the plot data to x.  After running this command x is only an handle to the plot, that becomes invalid after closing the corresponding window.

Thus leave the window open and run the print command.

HTH,
Kai


Reply | Threaded
Open this post in threaded view
|

Re: Printing Plots

siko1056
On Sun, Jul 22, 2018 at 3:47 AM Harishkumar U <[hidden email]> wrote:
On Sun, Jul 22, 2018, 06:47 Kai Torben Ohlhus <[hidden email]> wrote:
On Sat, Jul 21, 2018 at 1:13 PM harish3679 <[hidden email]> wrote:
Hello Folks!!

When I try to print this plot x=plot(1:10) using the command

print -dpng 'x.png'

It is popping this error

"error: print: no figure to print
error: called from
    print at line 347 column 5"

Any corrections on my part would be appreciated

Thanks!!
Harish


Dear Harish,

Do you close the resulting plot window, when running the following command?

   x = plot(1:10)

This assignment does not save the plot data to x.  After running this command x is only an handle to the plot, that becomes invalid after closing the corresponding window.

Thus leave the window open and run the print command.

HTH,
Kai
>
> Yes, that's correct. Can I use the hold on command instead??
>

What are you trying to do with hold on?  Please, can you explain your idea with a short code snippet maybe.

Kai.


Reply | Threaded
Open this post in threaded view
|

Re: Printing Plots

harish3679
It's working 

Actually, I am trying to generate multiple sine waves at different frequencies and use an input function to toggle between them

Thanks!!

On Mon, Jul 23, 2018 at 6:52 PM, Kai Torben Ohlhus <[hidden email]> wrote:
On Sun, Jul 22, 2018 at 3:47 AM Harishkumar U <[hidden email]> wrote:
On Sun, Jul 22, 2018, 06:47 Kai Torben Ohlhus <[hidden email]> wrote:
On Sat, Jul 21, 2018 at 1:13 PM harish3679 <[hidden email]> wrote:
Hello Folks!!

When I try to print this plot x=plot(1:10) using the command

print -dpng 'x.png'

It is popping this error

"error: print: no figure to print
error: called from
    print at line 347 column 5"

Any corrections on my part would be appreciated

Thanks!!
Harish


Dear Harish,

Do you close the resulting plot window, when running the following command?

   x = plot(1:10)

This assignment does not save the plot data to x.  After running this command x is only an handle to the plot, that becomes invalid after closing the corresponding window.

Thus leave the window open and run the print command.

HTH,
Kai
>
> Yes, that's correct. Can I use the hold on command instead??
>

What are you trying to do with hold on?  Please, can you explain your idea with a short code snippet maybe.

Kai.



--
Harish Kumar

M: +61 403332541

E: [hidden email]

A:

85,Cameron Parade, Bundoora, VIC 3083