运行下面的代码 foreach i in 2008 2009 2010 2011{
disp `"Working in Year `i'"'
tostring `i', local(yearStr)
disp `"yearStr"'
graph bar E if Year=="'i'", c(1) name ('i',replace)
histogram E if Year=="`i'"
就像标题所说的那样,我正在(学习)使用MatPlotLib/PyLab进行绘图,并且一切都很好,但是该图不包含我正在绘制的列表中的第一个值,然后导致所有值将一个坐标转换到左边。我做了一个非常简单的程序来说明这一点,并提供了最终图形的图像。 Windows 7,使用NotePad ++,但它在IDLE中也产生相同的结果。 感谢您的帮助! -Cory from pylab import plot, s
我试图从图中提取匹配节点以及它们的方向。下面的代码给出: for n1,n2,attr in G_new.edges(data=True):
if G_source.has_edge(n1,n2) :
#Get the specific weight between the two nodes
w = G_source[n1][n2]['weight'