Ask Your Question

Can I make plot(f(x)) figures smaller?

asked 2013-05-27 00:22:21 +0100

boyfarrell gravatar image

The plot command is very useful, but the default size of plots is quite large. Is it possible to reduce the size?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-05-27 02:28:05 +0100

vdelecroix gravatar image

You should have a look at the documentation of plot with

sage: plot?

There are plenty of options. In particular, to obtain a small picture you have the option figsize as in

sage: plot(sin(x), (x,-pi,pi), figsize=4)


sage: P = plot(sin(x), (x,-pi,pi))

The default value for figsize seems to be 8. With 4 you obtain quite a small picture. Note that you can also set this parameter to a pair (width,height).

edit flag offensive delete link more

answered 2022-03-30 16:49:44 +0100

kcrisman gravatar image

There is a poorly-documented option for modifying this globally as well.

is a dictionary that has a lot of options. So for instance, this would work to make a truly tiny graph.['figsize']=1

However, one shouldn't abuse it - it's too easy to think there should be one default! We try for one that works in a wide variety of cases, but I agree that the default is often too big for certain applications.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2013-05-27 00:22:21 +0100

Seen: 1,241 times

Last updated: Mar 30