regarding saving figure

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

regarding saving figure

rina

Hello,

 I have a problem with saving the figure, I am the new user of qt octave. Please help me for the same......

If i have the code for plotting


figure(10)

i=100;

h1=semilogy(t,y,'o')

hold on

h2=semilogy(t,f,'r')

set(gca,'Xtick',1:5:20);

set(gca,'FontSize',30,'Fontname','arial');

set(gca,'linewidth',2)

set(h1,'markersize',10);

set(h2,'linewidth',2,'linestyle','--');



but I dont know the exact command for saving in octave.....I think its something save filename.eps or so???

what to use after plotting???

--
regards,
reena

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: regarding saving figure

andy buckle
On Tue, Jul 12, 2011 at 2:50 PM, preeti gaikwad <[hidden email]> wrote:

>
> Hello,
>
>  I have a problem with saving the figure, I am the new user of qt octave.
> Please help me for the same......
>
> If i have the code for plotting
>
> figure(10)
>
> i=100;
>
> h1=semilogy(t,y,'o')
>
> hold on
>
> h2=semilogy(t,f,'r')
>
> set(gca,'Xtick',1:5:20);
>
> set(gca,'FontSize',30,'Fontname','arial');
>
> set(gca,'linewidth',2)
>
> set(h1,'markersize',10);
>
> set(h2,'linewidth',2,'linestyle','--');
>
> but I dont know the exact command for saving in octave.....I think its
> something save filename.eps or so???
>
> what to use after plotting???

print filename.eps

--
/* andy buckle */
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: regarding saving figure

andy buckle
>> > Hello,
>> >
>> >  I have a problem with saving the figure, I am the new user of qt
>> > octave.
>> > Please help me for the same......
>> >
>> > If i have the code for plotting
>> >
>> > figure(10)
>> >
>> > i=100;
>> >
>> > h1=semilogy(t,y,'o')
>> >
>> > hold on
>> >
>> > h2=semilogy(t,f,'r')
>> >
>> > set(gca,'Xtick',1:5:20);
>> >
>> > set(gca,'FontSize',30,'Fontname','arial');
>> >
>> > set(gca,'linewidth',2)
>> >
>> > set(h1,'markersize',10);
>> >
>> > set(h2,'linewidth',2,'linestyle','--');
>> >
>> > but I dont know the exact command for saving in octave.....I think its
>> > something save filename.eps or so???
>> >
>> > what to use after plotting???
>>
>> print filename.eps
>>
>> --
>> /* andy buckle */
>
> thanks it saves the figure but it is in black and white?? could u please let
> me know why?
>
> --
> preeti gaikwad

Please don't top-post.

I don't why your eps comes monochrome. I mostly use emf on windows,
and these come out in colour. If you give more details (Octave
version, where you obtained it, OS) then perhaps someone else on the
list can help.

--
/* andy buckle */
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: regarding saving figure

bpabbott
Administrator
On Jul 12, 2011, at 10:19 AM, Andy Buckle wrote:

>>>> Hello,
>>>>
>>>>  I have a problem with saving the figure, I am the new user of qt
>>>> octave.
>>>> Please help me for the same......
>>>>
>>>> If i have the code for plotting
>>>>
>>>> figure(10)
>>>>
>>>> i=100;
>>>>
>>>> h1=semilogy(t,y,'o')
>>>>
>>>> hold on
>>>>
>>>> h2=semilogy(t,f,'r')
>>>>
>>>> set(gca,'Xtick',1:5:20);
>>>>
>>>> set(gca,'FontSize',30,'Fontname','arial');
>>>>
>>>> set(gca,'linewidth',2)
>>>>
>>>> set(h1,'markersize',10);
>>>>
>>>> set(h2,'linewidth',2,'linestyle','--');
>>>>
>>>> but I dont know the exact command for saving in octave.....I think its
>>>> something save filename.eps or so???
>>>>
>>>> what to use after plotting???
>>>
>>> print filename.eps
>>>
>>> --
>>> /* andy buckle */
>>
>> thanks it saves the figure but it is in black and white?? could u please let
>> me know why?
>>
>> --
>> preeti gaikwad
>
> Please don't top-post.
>
> I don't why your eps comes monochrome. I mostly use emf on windows,
> and these come out in colour. If you give more details (Octave
> version, where you obtained it, OS) then perhaps someone else on the
> list can help.


To get color either add "-color" or use the color eps device.

        print -color filename.eps

        print -depsc filename.eps

For more info, take a look at ...

        help print

Ben

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: regarding saving figure

pathematica
In reply to this post by rina
I have been using the command in the form "print" then "-d" (as noted, standing for "device") followed by the file type, then the filename with a suitable filetype. For example, to print a pdf file with name "figure.pdf", that would be

print -dpdf figure.pdf

If you need a different format, change the filetype after the "-d" and at the end of the filename. You can produce at least the following types

print -dpng figure.png      (portable network graphics)
print -dsvg figure.svg       (scalable vector graphics)
print -djpg figure.jpg        (err ... joint something group I think)
print -dps figure.ps          (postscript)
print -deps figure.eps       (encapsulated postscript - as noted, monochrome)
print -depsc figure.epsc     (encapsulated postscript, colour)
print -deps figure.eps2       (encapsulated postscript2, monochrome)
print -depsc figure.eps2c     (encapsulated postscript2, colour)

If you have not set a particular folder to print to, you might have to search for it! You can specify the whole path if you want to avoid that.

eg for a png on the desktop of "user"

print -dpng /home/user/Desktop/figure.png

However good you think Octave is, it's much, much better.