Matplotlib消失了多个轴的图

时间:2015-06-09 18:36:43

标签: python python-2.7 matplotlib plot anaconda

我正在开展一个项目,针对各种轴绘制多个图形。但我无法使用matplotlib指南成功渲染任何图形,以了解如何在python中绘制多个轴。

我已经看过工作maptlotlib指南了。我现在尝试修改它以达到我自己的目的,所以我需要知道进行任何类型的图形显示所需的最低工作量。

特别是,有人可以向我解释我需要做些什么:

from sympy import * 
from matplotlib import pyplot as p #plot system
import numpy as np #for creating arrays fast
from scipy.interpolate import interp1d #for drawing curves between points
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA



transmissionTable1 = {"name":"SidTest" ,"date":"NULL","runID":9999 ,"port":9999, "users":[60,120,240] ,"ROUTING":[0.11, 0.246, 4.096] ,  "Disc01":[0.301,0.639,4.428], "Transaction per Sec":[12.12,23.18,31.81]}

host = host_subplot(111,axes_class=AA.Axes)
p.subplots_adjust(right=0.75)
axialShift = 60

basis = transmissionTable1["users"] #vary by users

t1  = host.twinx()
t2 = host.twinx()

p.plot([1,2,3],[1,2,3])

p.show()

成功渲染y = x的图形,在x = 1,2,3处插值?为什么创建host.twinx()的行为阻止了呈现图形的能力

0 个答案:

没有答案