亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? barchart.py

?? linux下基于c++的處理器仿真平臺(tái)。具有處理器流水線
?? PY
字號(hào):
import matplotlib, pylabfrom matplotlib.numerix import array, arange, reshape, shape, transpose, zerosfrom matplotlib.numerix import Floatmatplotlib.interactive(False)class BarChart(object):    def __init__(self, **kwargs):        self.init(**kwargs)    def init(self, **kwargs):        self.colormap = 'jet'        self.inputdata = None        self.chartdata = None        self.xlabel = None        self.ylabel = None        self.legend = None        self.xticks = None        self.yticks = None        self.title = None        for key,value in kwargs.iteritems():            self.__setattr__(key, value)    def gen_colors(self, count):        cmap = matplotlib.cm.get_cmap(self.colormap)        if count == 1:            return cmap([ 0.5 ])        else:            return cmap(arange(count) / float(count - 1))            # The input data format does not match the data format that the    # graph function takes because it is intuitive.  The conversion    # from input data format to chart data format depends on the    # dimensionality of the input data.  Check here for the    # dimensionality and correctness of the input data    def set_data(self, data):        if data is None:            self.inputdata = None            self.chartdata = None            return        data = array(data)        dim = len(shape(data))        if dim not in (1, 2, 3):            raise AttributeError, "Input data must be a 1, 2, or 3d matrix"        self.inputdata = data        # If the input data is a 1d matrix, then it describes a        # standard bar chart.        if dim == 1:            self.chartdata = array([[data]])        # If the input data is a 2d matrix, then it describes a bar        # chart with groups. The matrix being an array of groups of        # bars.        if dim == 2:            self.chartdata = transpose([data], axes=(2,0,1))        # If the input data is a 3d matrix, then it describes an array        # of groups of bars with each bar being an array of stacked        # values.        if dim == 3:            self.chartdata = transpose(data, axes=(1,2,0))    def get_data(self):        return self.inputdata    data = property(get_data, set_data)    # Graph the chart data.    # Input is a 3d matrix that describes a plot that has multiple    # groups, multiple bars in each group, and multiple values stacked    # in each bar.  The underlying bar() function expects a sequence of    # bars in the same stack location and same group location, so the    # organization of the matrix is that the inner most sequence    # represents one of these bar groups, then those are grouped    # together to make one full stack of bars in each group, and then    # the outer most layer describes the groups.  Here is an example    # data set and how it gets plotted as a result.    #    # e.g. data = [[[10,11,12], [13,14,15],  [16,17,18], [19,20,21]],    #              [[22,23,24], [25,26,27],  [28,29,30], [31,32,33]]]    #    # will plot like this:    #    #    19 31    20 32    21 33    #    16 28    17 29    18 30    #    13 25    14 26    15 27    #    10 22    11 23    12 24    #    # Because this arrangement is rather conterintuitive, the rearrange    # function takes various matricies and arranges them to fit this    # profile.    #    # This code deals with one of the dimensions in the matrix being    # one wide.    #    def graph(self):        if self.chartdata is None:            raise AttributeError, "Data not set for bar chart!"        self.figure = pylab.figure()        self.axes = self.figure.add_subplot(111)        dim = len(shape(self.inputdata))        cshape = shape(self.chartdata)        if dim == 1:            colors = self.gen_colors(cshape[2])            colors = [ [ colors ] * cshape[1] ] * cshape[0]        if dim == 2:            colors = self.gen_colors(cshape[0])            colors = [ [ [ c ] * cshape[2] ] * cshape[1] for c in colors ]        if dim == 3:            colors = self.gen_colors(cshape[1])            colors = [ [ [ c ] * cshape[2] for c in colors ] ] * cshape[0]        colors = array(colors)        bars_in_group = len(self.chartdata)        if bars_in_group < 5:            width = 1.0 / ( bars_in_group + 1)            center = width / 2        else:            width = .8 / bars_in_group            center = .1        bars = []        for i,stackdata in enumerate(self.chartdata):            bottom = array([0] * len(stackdata[0]))            stack = []            for j,bardata in enumerate(stackdata):                bardata = array(bardata)                ind = arange(len(bardata)) + i * width + center                bar = self.axes.bar(ind, bardata, width, bottom=bottom,                                    color=colors[i][j])                stack.append(bar)                bottom += bardata            bars.append(stack)        if self.xlabel is not None:            self.axes.set_xlabel(self.xlabel)        if self.ylabel is not None:            self.axes.set_ylabel(self.ylabel)        if self.yticks is not None:            ymin, ymax = self.axes.get_ylim()            nticks = float(len(self.yticks))            ticks = arange(nticks) / (nticks - 1) * (ymax - ymin)  + ymin            self.axes.set_yticks(ticks)            self.axes.set_yticklabels(self.yticks)        if self.xticks is not None:            self.axes.set_xticks(arange(cshape[2]) + .5)            self.axes.set_xticklabels(self.xticks)        if self.legend is not None:            if dim == 1:                lbars = bars[0][0]            if dim == 2:                lbars = [ bars[i][0][0] for i in xrange(len(bars))]            if dim == 3:                number = len(bars[0])                lbars = [ bars[0][number - j - 1][0] for j in xrange(number)]            self.axes.legend(lbars, self.legend, loc='best')        if self.title is not None:            self.axes.set_title(self.title)    def savefig(self, name):        self.figure.savefig(name)if __name__ == '__main__':    import random, sys    dim = 3    number = 5    args = sys.argv[1:]    if len(args) > 3:        sys.exit("invalid number of arguments")    elif len(args) > 0:        myshape = [ int(x) for x in args ]    else:        myshape = [ 3, 4, 8 ]    # generate a data matrix of the given shape    size = reduce(lambda x,y: x*y, myshape)    #data = [ random.randrange(size - i) + 10 for i in xrange(size) ]    data = [ float(i)/100.0 for i in xrange(size) ]    data = reshape(data, myshape)    # setup some test bar charts    if True:        chart1 = BarChart()        chart1.data = data        chart1.xlabel = 'Benchmark'        chart1.ylabel = 'Bandwidth (GBps)'        chart1.legend = [ 'x%d' % x for x in xrange(myshape[-1]) ]        chart1.xticks = [ 'xtick%d' % x for x in xrange(myshape[0]) ]        chart1.title = 'this is the title'        chart1.graph()        #chart1.savefig('/tmp/test1.png')    if False:        chart2 = BarChart()        chart2.data = data        chart2.colormap = 'gray'        chart2.graph()        #chart2.savefig('/tmp/test2.png')    pylab.show()

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区在线免费观看| 日韩一区二区三区电影在线观看| 久久精品一区四区| 国产成人精品www牛牛影视| 欧美国产日韩a欧美在线观看| 成人污视频在线观看| 亚洲同性gay激情无套| 一本到三区不卡视频| 同产精品九九九| 精品国产91乱码一区二区三区 | 成人免费毛片高清视频| 国产精品午夜在线| 91欧美激情一区二区三区成人| 亚洲日本va午夜在线电影| 欧美亚洲一区三区| 美女一区二区视频| 国产精品视频麻豆| 欧美日韩一区二区三区不卡| 男女性色大片免费观看一区二区| 日韩免费福利电影在线观看| 国产大片一区二区| 一区二区三区精品在线观看| 日韩亚洲欧美成人一区| 成人av在线看| 秋霞国产午夜精品免费视频| 国产精品女同一区二区三区| 精品视频1区2区| 国内精品国产三级国产a久久| ●精品国产综合乱码久久久久 | 9i在线看片成人免费| 日韩福利电影在线观看| 国产亚洲成年网址在线观看| 91黄色免费网站| 国产揄拍国内精品对白| 亚洲最快最全在线视频| 久久亚洲综合色一区二区三区| 99re66热这里只有精品3直播 | 日韩一级高清毛片| 成人app软件下载大全免费| 日韩中文欧美在线| 亚洲男人的天堂av| www国产精品av| 欧美日韩亚洲综合| 成人av资源网站| 精品无人区卡一卡二卡三乱码免费卡| 综合亚洲深深色噜噜狠狠网站| 日韩午夜激情视频| 欧美午夜影院一区| 91首页免费视频| 国产成人一区在线| 麻豆国产精品777777在线| 一区二区免费看| 国产精品国产三级国产aⅴ中文| 欧美成人精品高清在线播放| 欧美日韩精品欧美日韩精品| 波多野结衣欧美| 国产精品一区二区三区网站| 男男视频亚洲欧美| 香蕉乱码成人久久天堂爱免费| 中文字幕av一区二区三区免费看 | 免费在线欧美视频| 午夜精品爽啪视频| 亚洲国产日韩精品| 亚洲综合999| 亚洲精品国产品国语在线app| 国产精品网站在线| 久久精品视频在线免费观看| 精品国产麻豆免费人成网站| 日韩一区二区三区高清免费看看| 欧美日韩一区三区| 欧美日韩国产123区| 欧美日韩一区精品| 欧美电影在线免费观看| 欧美日韩精品久久久| 色94色欧美sute亚洲线路一ni| 波多野结衣亚洲| 99re热视频精品| 日本精品一级二级| 欧美三电影在线| 欧美日韩久久不卡| 91精品一区二区三区久久久久久 | 91小宝寻花一区二区三区| 懂色av中文字幕一区二区三区| 国产伦精品一区二区三区在线观看| 麻豆91精品91久久久的内涵| 久久99久久99| 国产精品66部| av电影一区二区| 91蜜桃免费观看视频| 在线视频观看一区| 欧美区视频在线观看| 91精品国产麻豆国产自产在线 | 国内一区二区在线| 国产精品1区2区3区在线观看| 国产91综合网| 91麻豆swag| 欧美三级日韩三级国产三级| 欧美一区二区三区不卡| 精品裸体舞一区二区三区| 中文字幕免费不卡| 一区二区在线观看视频| 视频一区二区欧美| 国产一区欧美二区| 99久久精品免费| 欧美伦理电影网| 久久综合色播五月| 亚洲欧洲99久久| 日韩激情中文字幕| 国产传媒一区在线| 欧美午夜影院一区| 欧美精品一区二区三区很污很色的| 欧美国产精品一区二区三区| 亚洲精品免费视频| 精品亚洲aⅴ乱码一区二区三区| 成人午夜电影久久影院| 欧美一a一片一级一片| 精品理论电影在线| 伊人开心综合网| 久久精品噜噜噜成人av农村| av亚洲产国偷v产偷v自拍| 欧美三级资源在线| 中文字幕国产精品一区二区| 天天影视网天天综合色在线播放 | 91在线云播放| 欧美一级片在线观看| 综合婷婷亚洲小说| 寂寞少妇一区二区三区| 色综合色综合色综合色综合色综合 | 麻豆精品视频在线| 91久久国产最好的精华液| 欧美本精品男人aⅴ天堂| 亚洲精品视频免费看| 国产精品一区二区三区乱码| 欧美日韩精品专区| 亚洲视频每日更新| 国产乱对白刺激视频不卡| 精品视频1区2区| 中文字幕在线播放不卡一区| 激情久久久久久久久久久久久久久久| 色婷婷国产精品综合在线观看| 精品成人私密视频| 日本午夜一本久久久综合| 91色综合久久久久婷婷| 久久一二三国产| 蜜桃av噜噜一区| 欧美丰满高潮xxxx喷水动漫 | 亚洲大尺度视频在线观看| 成人免费视频caoporn| 2欧美一区二区三区在线观看视频| 亚洲制服欧美中文字幕中文字幕| 成人高清视频在线| 国产偷国产偷精品高清尤物| 毛片不卡一区二区| 91麻豆精品国产91久久久更新时间 | 亚洲国产综合在线| 色噜噜狠狠色综合欧洲selulu| 欧美国产成人精品| 国产精品系列在线播放| 日韩欧美色电影| 蜜臀91精品一区二区三区| 欧美福利视频一区| 天天综合天天综合色| 欧美日韩一级大片网址| 亚洲一区自拍偷拍| 欧美又粗又大又爽| 亚洲曰韩产成在线| 欧美怡红院视频| 午夜精品久久久久久久久久久| 欧美优质美女网站| 天天操天天色综合| 6080yy午夜一二三区久久| 视频一区视频二区中文字幕| 在线播放中文一区| 免费成人在线网站| 精品国产免费久久| 国产91精品免费| 国产精品久久久久四虎| 91在线免费视频观看| 亚洲综合丝袜美腿| 欧美群妇大交群中文字幕| 蜜臀av性久久久久av蜜臀妖精| 日韩欧美一级在线播放| 国产一区二区三区久久久| 国产校园另类小说区| 99久久99久久精品免费看蜜桃 | 亚洲国产视频直播| 91精品国产高清一区二区三区 | 国产网站一区二区| 99国产精品视频免费观看| 亚洲图片自拍偷拍| 欧美一区二区三区视频在线| 国内成人免费视频| 中文字幕中文字幕在线一区| 91行情网站电视在线观看高清版| 香蕉av福利精品导航| 欧美精品一区二区三区在线播放| 国产精一品亚洲二区在线视频| 1024精品合集| 日韩精品一区二区三区视频在线观看| 韩国女主播一区|