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

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

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

add a comment

5

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)
```

or

```
sage: P = plot(sin(x), (x,-pi,pi))
sage: P.show(figsize=4)
```

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)`

.

2

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

```
sage.plot.graphics.Graphics.SHOW_OPTIONS
```

is a dictionary that has a lot of options. So for instance, this would work to make a truly tiny graph.

```
sage.plot.graphics.Graphics.SHOW_OPTIONS['figsize']=1
plot(x,(x,-1,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.

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

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

Seen: **1,403 times**

Last updated: **Mar 30 '22**

Decrease accuracy for floats (decrease decimal places reported)

How do I create a log plot of line data?

question about plotting points and calculating the average slope

a functional java applet for 2d plots

Fast numerical plot command that always works?

In sage plot: fill the area under a curve between two x-values.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.