user1772257
user1772257

Reputation: 323

How to save plots as colorful .eps in octave

I am using win7 and octave 3.6.4, when i generate a plot with octave and save as .eps its colors go away. For example :

clf();
surf(peaks);

generates following graphic enter image description here

But when i run the following codes seperately

saveas (1,"test.eps")  or print (1,"test.eps") or print -deps test.eps

to save the graphic as .eps and import it into latex it becomes grayscale. enter image description here

Upvotes: 4

Views: 10617

Answers (2)

David
David

Reputation: 11

you can use

print -dtex test.tex

Octave automatically exports your figure into LaTeX/Color EPS figure, with LaTeX fonts.

Upvotes: 1

am304
am304

Reputation: 13876

Try

print -depsc test.eps

or

print -color -depsc test.eps

if the first one doesn't work.

EDIT:

Which graphics toolkit are you using? with gnuplot, it works just fine for me (Octave 3.6.2, Win XP) using the -eps flag.

Upvotes: 9

Related Questions