我能够在单个图中绘制多个数据集,并在单个数据集中绘制一个图,并在y轴(This page helped me)中单独划分。但我想做的是在下图中删除10 ^ 46到10 ^ 58的部分。!我用来绘制的代码是
from numpy import *
from pylab import *
from matplotlib import rc, rcParams
import matplotlib.pyplot as plt
import numpy as np
rc('text',usetex=True)
rc('font',**{'family':'serif','serif':['Computer Modern']})
x_1=np.linspace(5e13, 8e14, 201)
z = np.linspace(0, np.pi, 201)
y_1 =np.cos(z)*1e43
x_2=np.linspace(5e13, 1e15, 201)
y_2 =np.cos(z)*1e61
x_3=np.linspace(3e13, 1e15, 201)
y_3 =np.tan(z)*1e63
run_1,=plt.plot(x_1, y_1, '.b')
run_2,=plt.plot(x_2, y_2, '.g')
run_3,=plt.plot(x_3, y_3,'.r')
plt.yscale('log')
plt.xscale('log')
plt.xlim([40000000000000,2000000000000000])
plt.legend((run_1, run_2,run_3), ('CR Flux','Gas Ensrgy','Total Energy'),scatterpoints=1, loc='lower right', ncol=1, fontsize=12)
# Turn on a grid
grid(True)
savefig('camp_line.png')
show()
如何实现这一目标?是否有实现这一目标的功能?