Ask Your Question
0

saving interact notebook output

asked 2011-12-18 17:00:36 -0500

dazedANDconfused gravatar image

I've created an image using interact. After showing the object with: S.show(aspect_ratio=1,figsize=[size,size],axes=False) I wanted to save it as a .pdf instead of .png so I added S.save('MyImage.pdf',figsize=20) to my code. For some reason I don't understand the MyImage.pdf file displays the axes. I've resorted to cropping out the axes but with multiple files it's a pain. How do I remove the axes from the saved file?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2011-12-18 22:51:29 -0500

Volker Braun gravatar image

How about

S.save('MyImage.pdf', figsize=20, axes=False)
edit flag offensive delete link more

Comments

Yes, the save command should accept the same options as the show comand.

Jason Grout gravatar imageJason Grout ( 2011-12-19 02:22:28 -0500 )edit

Thanks! That worked. I guess the logic is that the object S is independent of how it's displayed, so the formatting needs to be specified in the save statement, too.

dazedANDconfused gravatar imagedazedANDconfused ( 2011-12-19 09:32:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-18 17:00:36 -0500

Seen: 154 times

Last updated: Dec 18 '11