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
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.