Python 您所在的位置:网站首页 分组条形图要怎么做 Python

Python

2023-06-06 07:27| 来源: 网络整理| 查看: 265

Grouped bar charts are very easy to visualize the comparison between two similar quantities such as marks comparison between two students. It is an extension of a simple bar graph and in this article, we are going to illustrate an example in which we plot marks of five different students from the same class in Mathematics and Science. Furthermore, we are going to change the color and width of the bars for a clear understanding of the usage of the Grouped Bar Chart.

分组的条形图非常容易可视化两个相似量之间的比较,例如两个学生之间的分数比较。 它是一个简单的条形图的扩展,在本文中,我们将说明一个示例,在该示例中,我们将数学和科学领域同一班的五个不同学生的分数作图。 此外,我们将更改条形的颜色和宽度,以清楚地了解分组条形图的用法。

Syntax:

句法:

plt.bar(x - width/2, math_means, width, label='Mathematics') plt.bar(x + width/2, science_means, width, label='Science')


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有