SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Lion K. <kur...@ya...> - 2009年03月23日 14:04:10
Hi,
I have a newbie question regarding matplotlib. I want to plot a graph without the white border around it. I googled a lot but didn't find anything useful. The following code produces a graph without any ticks and it also makes the white border around the graph transparent.
##########
import matplotlib
matplotlib.use('AGG')
import matplotlib.pyplot as plt
fig = plt.figure(num = None, figsize = (float(size[0])/dpi, float(size[1])/dpi))
plt.axes(axisbg=white, frameon = True)
fig.set_frameon(False)
#Set axes and disable ticks
plt.ylim(miny, maxy)
plt.xlim(0,length)
plt.yticks([])
plt.xticks([])
...
plt.savefig(outfile, dpi = dpi, transparent = transparent)
##########
I would like to know how to make the frame around the graph disappear completely so that the resulting image contains the graph in full size.
Hmm...i am also curious if it is possible to display the tick markers inside the graph.
Best regards and thanks for your help,
Lion
 
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /