我跟着一个小教程,让我靠近我想要的地方,但它不是那里,我不知道如何用它做下一步.
这是’我目前的数字:
我不知道如何将渐近线绘制到此图中.
我想我需要创建一个名为Y的变量,它是一条垂直线,然后绘制出那条线?我不确定这是否正确
在这种情况下,我如何为渐近线创建线?
编辑
import pylab as pl
import numpy as np
import matplotlib.pyplot as plt
"""
This is all from the tutorial located at :
http://scipy-lectures.github.io/intro/matplotlib/matplotlib.html
"""
pl.figure(figsize=(10, 6), dpi=80)
pl.subplot(1, 1, 1)
X = np.linspace(-5, 5, 500, endpoint=True)
C = (1/X**2)-5
P = X - X - 0.1
pl.xlim(X.min() * 1.1, X.max() * 1.1)
pl.ylim(C.min() * 1.1, C.max() * 1.1)
"""
Alters the position of the axis - moves them to the centre
"""
ax = pl.gca() # gca stands for 'get current axis'
a