invalidrestore

After doing some investigation, I discovered that this problem is reproducible using sample programs such as axes_demo.py. Here are the steps I took:

a) Run axes_demo.py
b) Save the plot as eps file
c) Start Word
d) Insert the eps file
e) Print

I got a 2 page print: 1 for the plot, and 1 for the error message invalidrestore.

Could somebody please try and see if it fails the same on their system?

···

-----Original Message-----
From: matplotlib-users-bounces@lists.sourceforge.net
[mailto:matplotlib-users-bounces@lists.sourceforge.net] On
Behalf Of kc106_2005-matplotlib@...9...
Sent: Friday, February 23, 2007 4:42 PM
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] invalidrestore

Thanks for pointing that out, Eric.

I try that and it did turn my plot 90 degree. The bad news
is that GSview imports it upside down and if I want to view
the plot on the screen, I have to rotate it downside up
first. (Hey, I shouldn't complain. At least I can print
without wasting a piece of paper for each plot).

So, looks like it's true that something MPL did to the eps
file is causing Word to spit out that error page. I wish I
know what it is.

The problem of not finding out is that I need to send these
plots to clients. I don't want to require that they have an
.eps viewer in order to see my plots...

Regards

> -----Original Message-----
> From: Eric Firing [mailto:efiring@…202…]
> Sent: Friday, February 23, 2007 3:07 PM
> To: kc106_2005-matplotlib@…9…
> Cc: matplotlib-users@lists.sourceforge.net
> Subject: Re: [Matplotlib-users] invalidrestore
>
>
> kc106_2005-matplotlib@…9… wrote:
> > I installed gsview and gscript and tried it. The good
> news is that when I print from inside gsview, the error page
> is gone. The bad news is that the oritentation is wrong. My
> plot is designed for landscape. From word, I set the page
> setup to landscape, import the picture, and print. But with
> gsview, it imports my plot 90 degree wrong. Changing
> orientation flips the whole page 90 degree but the plot gets
> rotated as well and so it still prints wrong.
> >
> > I guess I have no choice but to regress step by step and
> see which MPL
> > feature aggrevated this condition.
> >
>
> Did you try saving the figure using the orientation kwarg? This is
> intended for postscript output.
>
> e.g.
>
> from pylab import figure, show, close
> fig = figure()
> ax = fig.add_subplot(1,1,1)
> ax.plot([0,1], [0,1])
> fig.savefig('myplot.ps', orientation='landscape')
> close(fig)
>
> Eric
>

--
John Henry

--------------------------------------------------------------
-----------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your opinions on IT & business topics through
brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge

&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
John Henry

I don't have Microsoft Word, so I can't test this. Considering how matplotlib
creates eps files that are compatible with latex, ghostscript, etc., I wonder
if this is a problem with Word.

Darren

···

On Sunday 25 February 2007 12:41:58 pm kc106_2005-matplotlib@...9... wrote:

After doing some investigation, I discovered that this problem is
reproducible using sample programs such as axes_demo.py. Here are the
steps I took:

a) Run axes_demo.py
b) Save the plot as eps file
c) Start Word
d) Insert the eps file
e) Print

I got a 2 page print: 1 for the plot, and 1 for the error message
invalidrestore.

Could somebody please try and see if it fails the same on their system?

Using PS/EPS in Word or any office product is a pretty unusual
combination. My experience is that they are not supported s well as
other image formats. Will PNG work for you? That is what I usually
use for Office. You may also consider PDF or SVG if you need vector
graphics.

JDH

···

On 2/25/07, kc106_2005-matplotlib@...9... <kc106_2005-matplotlib@...9...> wrote:

After doing some investigation, I discovered that this problem is reproducible using sample programs such as axes_demo.py. Here are the steps I took:

a) Run axes_demo.py
b) Save the plot as eps file
c) Start Word
d) Insert the eps file
e) Print