MatPlotlib上的第二个函数未完全显示

MatPlotlib上的第二个函数未完全显示,matplotlib,Matplotlib,我想让红色功能完全出现。我试过了 plt.tight_layout plt.gcf() 这是我目前为止的代码 plt.figure(figsize=(6,6)) plt.plot(x, ppf(x,1)) plt.plot(x,ppf(x,2)) plt.xlabel("Coconuts") plt.ylabel("Fish") plt.xlim(0,20) plt.ylim(0,20) plt.margins(y=.1, x=.1) plt.tight_layout plt.gcf() pl

我想让红色功能完全出现。我试过了

plt.tight_layout
plt.gcf()
这是我目前为止的代码

plt.figure(figsize=(6,6))
plt.plot(x, ppf(x,1))
plt.plot(x,ppf(x,2))
plt.xlabel("Coconuts")
plt.ylabel("Fish")
plt.xlim(0,20)
plt.ylim(0,20)
plt.margins(y=.1, x=.1)
plt.tight_layout
plt.gcf()
plt.show()

我应该如何着手解决这个问题

这是PPF:

cmax =1000
x = np.linspace(0.1,10, 400)
def ppf(x,Ax):
    return np.sqrt(100-(x**2/Ax))

x
在两种(蓝色和红色)情况下都从0.1运行到10。如果希望在
x
的值大于10时对其中一条曲线求值,则需要提供一个包含这些值的数组

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0.1,10, 400)
x2 = np.linspace(0.1,np.sqrt(199.99), 800)

def ppf(x,Ax):
    return np.sqrt(100-(x**2/Ax))

plt.figure(figsize=(6,6))
plt.plot(x, ppf(x,1.))
plt.plot(x2, ppf(x2,2.))
plt.xlabel("Coconuts")
plt.ylabel("Fish")
plt.xlim(0,20)
plt.ylim(0,20)
plt.margins(.1)

plt.show()

没有人知道什么是ppf(x,1)。请阅读,很抱歉。补充说。