English 中文(简体)
matplotlib:我如何方便地把这块土地划归信道。
原标题:matplotlib: how do I easily fit the plot to the canvas
  • 时间:2011-10-01 09:20:49
  •  标签:
  • matplotlib

也许这是一个简单的问题,但我曾几次试图解决该问题,而且这只会使它发挥作用。 我的问题是,我的阴谋比信道大:

是否有办法使地块适合浮舟,而不改变信道的规模?

这里,我使用的是一块地块(靠近路易斯岛):

da = plt.figure()
l1 = da.add_subplot(111).plot(dummyZ, delta_a, "k-")
da.add_subplot(111).set_xlabel(r"$z/L$")
da.add_subplot(111).set_ylabel(r"$delta a(z)$")
da.add_subplot(111).grid(True)
da.savefig("da.png")

序言:

import matplotlib.pyplot as plt
plt.rcParams[ font.size ]=18

http://www.ohchr.org。

这是我现在用的:

da = plt.figure()
l1 = da.add_subplot(111).plot(dummyZ, delta_a, "k-")
da.add_subplot(111).set_xlabel(r"$z/L$")
da.add_subplot(111).set_ylabel(r"$delta a(z)$")
da.add_subplot(111).grid(True)
da.subplots_adjust(left=0.2, bottom=0.15) # !!!
da.savefig("da.png")
最佳回答

如果我正确理解这个问题,你就希望左上有更多余地获得比额表标题?

完成这项工作

fig.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)

我收到了一份简单的文件。

subplots_adjust(top=0.8)

调整我的一线。

希望会有所帮助。

问题回答

暂无回答




相关问题
Interactive mode in matplotlib

I want to dynamically update the scatter plot based on the y-axis data received from a socket connection. I used python matplot lib in interactive mode to do this, but during dynamic updation if i ...

Couple of matplotlib newbie doubts

I am just starting to use matplotlib and I have hit upon 2 major roadblocks, which I can t seem to work around from the docs/examples,etc: Here is Python source: #!/usr/bin/python import matplotlib ...

How to disable screen update in matplotlib

I have a loop that is adding a line to a plot on each iteration. Right now this is horribly slow as it seems to redraw the the whole graph each time. Is it possible to disable screen updates for a ...

How to use Matplotlib in Django?

From some examples from the Internet I made the test code below. It works! ... BUT if I reload the page, the pie will draw itself with the same image. Some parts get darker every time I reload the ...

Plotting vector fields in python (matplotlib)

I found this code on http://matplotlib.sourceforge.net/examples/pylab_examples/quiver_demo.html from pylab import * from numpy import ma X,Y = meshgrid( arange(0,2*pi,.2),arange(0,2*pi,.2) ) U = cos(...

Multiple grids on matplotlib

I m making plots in Python and matplotlib, which I found huge and flexible, till now. The only thing I couldn t find how to do, is to make my plot have multiple grids. I ve looked into the ...

热门标签