Created
November 9, 2013 14:13
-
-
Save andersx/7385821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylab | |
import numpy | |
import os | |
# Make a simple plot | |
x = numpy.arange(1, 100, 1) | |
y = x**2 | |
pylab.plot(x, y) | |
# Define a filename (remember the .pdf) | |
filename = "my_file.pdf" | |
# Save and convert! | |
pylab.savefig(filename) | |
os.system("pdfcrop %s %s" % (filename, filename)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment