Skip to Content.
Sympa Menu

texmacs-users - RE: [TeXmacs] inline plots

Subject: mailing-list for TeXmacs Users

List archive

RE: [TeXmacs] inline plots


Chronological Thread 
  • From: "Bill Eaton" <address@hidden>
  • To: <address@hidden>
  • Subject: RE: [TeXmacs] inline plots
  • Date: Fri, 24 May 2013 08:14:27 -0700

I think the size of the inline figures is controlled by the Postcript. You
would probably have to scale them with another utility if you're not
generating the Postscript yourself.

If it's a plot you're generating, you might be able to control the size
yourself. I typically use matplotlib, and there is a figsize option. The
minimal example below makes a 3x2 inch (WxH) figure:
import matplotlib
matplotlib.use('ps')
from pylab import *
fig = figure(figsize=(3,2))
ax=fig.add_subplot(111)
ax.plot([1,2,3])
ax.set_title('inline demo')
savefig('demo.eps')
ps_out('demo.eps')
Honestly, I'm not even 100% sure this is even a minimal example. By my
lights, it's a lot of lines of code. And another confession: I'm haven't
checked if the finished picture prints at 3x2 inches. But it looks to be
close.

--Bill Eaton

-----Original Message-----
From: address@hidden [mailto:address@hidden] On Behalf
Of Andrea Gamba
Sent: Friday, May 24, 2013 12:20 AM
To: address@hidden; address@hidden
Subject: [TeXmacs] inline plots

Hello, I am routinely using the ps_out() method to get inline figures with
scipy and the python plugin.

The figures I obtain are by default much larger than the width of the page,
so I have to manually resize them one by one.

Is it possible to use ps_out() with an argument specifying the size of the
inline figure, or is there any optimal way to produce an inline figure of
desired size?

Andrea Gamba




Archive powered by MHonArc 2.6.19.

Top of Page