<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      matplotlib 堆疊柱狀圖 barh 寫法

      顏色方案
      
      
      list(plt.colormaps.keys())

      import numpy as np
      import matplotlib.pyplot as plt
      
      
      category_names = ['Strongly disagree', 'Disagree',
                        'Neither agree nor disagree', 'Agree', 'Strongly agree']
      results = {
          'Question 1': [10, 15, 17, 32, 26],
          'Question 2': [26, 22, 29, 10, 13],
          'Question 3': [35, 37, 7, 2, 19],
          'Question 4': [32, 11, 9, 15, 33],
          'Question 5': [21, 29, 5, 5, 40],
          'Question 6': [8, 19, 5, 30, 38]
      }
      
      
      def survey(results, category_names):
          """
          Parameters
          ----------
          results : dict
              A mapping from question labels to a list of answers per category.
              It is assumed all lists contain the same number of entries and that
              it matches the length of *category_names*.
          category_names : list of str
              The category labels.
          """
          labels = list(results.keys())
          data = np.array(list(results.values()))
          data_cum = data.cumsum(axis=1)
          category_colors = plt.colormaps['RdYlGn'](
              np.linspace(0.15, 0.85, data.shape[1]))
      
          fig, ax = plt.subplots(figsize=(9.2, 5))
          ax.invert_yaxis()
          ax.xaxis.set_visible(False)
          ax.set_xlim(0, np.sum(data, axis=1).max())
      
          for i, (colname, color) in enumerate(zip(category_names, category_colors)):
              print((colname,color))
              widths = data[:, i]
              starts = data_cum[:, i] - widths
      
              rects = ax.barh(labels, widths, left=starts, height=0.5,
                              label=colname, color=color)
      
              r, g, b, _ = color
              text_color = 'white' if r * g * b < 0.5 else 'darkgrey'
              ax.bar_label(rects, label_type='center', color=text_color)
          ax.legend(ncol=len(category_names), bbox_to_anchor=(0, 1),
                    loc='lower left', fontsize='small')
      
          return fig, ax
      
      
      survey(results, category_names)
      plt.show()

       

       


      https://matplotlib.org/stable/gallery/index.html

      posted @ 2022-02-21 14:15  Hany47315  閱讀(316)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 国产乱子伦视频在线播放| 中文字幕日韩有码av| 老熟女多次高潮露脸视频| 色悠悠国产精品免费观看| 人妻无码中文字幕| 亚洲国产午夜福利精品| 97在线碰| 成人免费无遮挡在线播放| 少妇高潮水多太爽了动态图| 日韩av在线一区二区三区| 国产在线国偷精品免费看| 日本韩国一区二区精品| 精品无码老熟妇magnet| 99九九热久久只有精品| 午夜DY888国产精品影院| 亚洲欧美人成网站在线观看看| 大肉大捧一进一出好爽视频mba | 无码日韩精品一区二区三区免费| 草草浮力影院| 国产一区二区午夜福利久久| 国产很色很黄很大爽的视频| 北宁市| 天干天干夜天干天天爽| 国内精品免费久久久久电影院97| 天天躁夜夜躁av天天爽| 天堂网av成人在线观看| 亚洲av无码之国产精品网址蜜芽 | 皋兰县| 精品久久久久无码| 亚洲精品成人福利网站| 民权县| 日韩乱码视频一区二区三区| 最新国产精品中文字幕| 日韩人妻无码一区二区三区综合部| 国产综合精品一区二区三区| 国产激情艳情在线看视频| 都市激情 在线 亚洲 国产| 国产精品SM捆绑调教视频| 亚洲欧美人成网站在线观看看| 日本免费一区二区三区| 激情综合网激情五月我去也|