Skip to content

pylab plots cut off #4194

@malb

Description

@malb

On Thursday 25 September 2008, Stan Schymanski wrote on [sage-support]:

Dear all,

When I upgraded to 3.1.2, I found that some of my plots generated
using pylab in the notebooks miss their bottom bits. It seems to be
related to the dpi setting. Example:

import pylab
x1 = srange(0,1.1,0.01)
d1 = [2*x+x^2 for x in x1]
pylab.clf() # clear the figure first
pylab.figure(1)
pylab.plot(x1,d1, label="d1")
pylab.ylabel("$f(x)$") # label the axes
pylab.xlabel("$x$")
pylab.savefig('foo.png',dpi=72) # fire!

If I leave the "dpi=72" out in the last line, the plot is larger and
complete. This problem did not occur in sage 3.1.1, so I assume that
it is a bug.

Upstream: Fixed upstream, in a later stable release.

CC: @sagetrac-mvngu @mwhansen @jasongrout

Component: graphics

Keywords: plot

Author: Ryan Grout

Issue created by migration from https://trac.sagemath.org/ticket/4194

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions