octave - Saving image in plot window after placing points in plot -


using octave, able show image , plot red circles on it, follow:

tux = imread('tux.png'); imshow(tux); hold on; plot(100,100,'r','markersize', 10); plot(150,200,'r','markersize', 10); 

the above code display window:

image red circles plotted over

my question is: how can save image being showed inside window?

thank much!

pretty simple. use:

print -djpg image.jpg 

print command in octave allows capture what's seen in current figure window. -d specifies output device want write to. there multiple "devices" can use save file... eps, ps, tex, etc. device can image writer, , here chose jpeg. can choose other valid image formats supported octave. take @ link provided above more details.

after, specify file name want save plot to. in case, chose image.jpg.

you can take @ saveas. make sure handle current figure first before doing so:

h = gcf; saveas(h, "image.jpg"); 

also... more point-and-click approach go file -> save as in figure image displayed in :)


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -