摘要:柱状图是一类常见的统计图形,主要用于显示和对比各类别数据的数量或数值差异。数据大小通过矩形柱的高度或长度来体现,柱体之间通常保持相同的间距,便于直观观察与比较。它特别适合展示离散类型的分类信息,也常用于表现某个变量在不同条件下的分布特征。
分享兴趣,传播快乐,
增长见闻,留下美好。
亲爱的您,这里是LearningYard学苑!
今天小编为大家带来
“慧学(34):Origin柱状图绘图学习”
欢迎您的访问!
Share interest, spread happiness,
increase knowledge, and leave beautiful.
Dear, this is the LearingYard Academy!
Today, the editor brings the
"Hui Xue (34): Origin bar chart drawing learning"
Welcome to visit!
一、思维导图(Mind mapping)
二、柱状图简介(Introduction to bar chart)
柱状图是一类常见的统计图形,主要用于显示和对比各类别数据的数量或数值差异。数据大小通过矩形柱的高度或长度来体现,柱体之间通常保持相同的间距,便于直观观察与比较。它特别适合展示离散类型的分类信息,也常用于表现某个变量在不同条件下的分布特征。
A bar chart is a common statistical graphic used to display and compare the quantity or numerical differences of data across categories. The height or length of the rectangular bars represent the data size, and the bars are typically spaced evenly apart, making them easier to visualize and compare. It's particularly well-suited for displaying discrete categorical information and is often used to illustrate the distribution of a variable under different conditions.
在Origin软件中,柱状图属于最基础的可视化形式之一。该软件提供了多样化的柱状图类型,包括简单柱状图、分组柱状图、堆积柱状图以及百分比堆积柱状图,并允许用户灵活调整误差棒、数据标签、颜色填充和图形样式。使用者能够借助Origin的交互式功能,对图表进行精细排版和高质量导出,因此广泛应用于科研论文和技术报告的结果呈现。
In Origin, bar charts are one of the most basic visualization forms. The software provides a variety of bar chart types, including simple bar charts, grouped bar charts, stacked bar charts, and percentage stacked bar charts, and allows users to flexibly adjust error bars, data labels, color fills, and graphic styles. With Origin's interactive functions, users can fine-tune chart layout and export high-quality charts, making it widely used in presenting results in scientific research papers and technical reports.
三、绘制柱状图的步骤(Steps to draw a bar chart)
1、导入或输入数据(Import or enter data)
在Origin中首先新建一个工作簿,并将数据录入到工作表。第一行应作为列名,第一列存放类别变量(如班级),其余列依次输入需要比较的系列数据(如数学、语文、英语)。完成录入后,将“班级”列设定为X轴的类别列,其余列设为Y轴的数据列,同时检查数值格式是否正确,并确认没有缺失值或异常数据。
First, create a new workbook in Origin and enter the data into the worksheet. The first row should be used as column names, the first column should contain the categorical variable (e.g., class), and the remaining columns should contain the series of data to be compared (e.g., Math, Chinese, English). Once the data is entered, set the "Class" column as the categorical column on the X-axis and the remaining columns as the data columns on the Y-axis. Also, check that the numeric format is correct and that there are no missing values or abnormal data.
2、生成分组柱状图(Generate a grouped bar chart)
在工作表中,首先用鼠标选中“班级”列以及各学科对应的数据列。随后在菜单栏选择绘图中的分类选项,并在其中点击柱状图。此时Origin会自动生成一幅分组柱状图,每个班级下都会并列显示不同学科的柱形,从而直观展现各类别之间的对比情况。
In the worksheet, first select the "Class" column and the corresponding data columns for each subject. Then, select the Categorize option in the Draw menu and click on the Bar Chart. Origin will automatically generate a grouped bar chart, displaying the bars for each subject side by side under each class, providing a visual comparison of the categories.
3、调整图例与数据标签(Adjust legend and data labels)
在图中右键点击图例并选择属性,即可修改名称,使其与列标题保持一致或替换为更直观的标签。若需要在柱形上直接显示数值,可以双击柱子,在标签设置中选择添加数据标签,这样每个柱子上方都会显示具体数值,从而便于直观对比。
Right-click the legend in the chart and select Properties to modify the name to match the column heading or replace it with a more intuitive label. To display the valuesdirectly on the columns, double-click the column and select Add Data Labels in the Label Settings. This will display the specific value above each column, making it easier to compare.
4、调整坐标轴与柱子样式(Adjust the axis and column styles)
通过双击横轴或纵轴进入设置窗口,可以为坐标轴添加合适的标题和单位,同时根据数据分布调整纵轴范围,以避免图表出现过多空白或数据被过度压缩。在绘图细节的设置中,还能够修改柱体宽度、间距、颜色填充以及边框样式,从而提升图形的美观性和可读性。若类别标签过长,则可通过旋转横轴文字或设置换行方式来改善显示效果。
By double-clicking the horizontal or vertical axis to enter the settings window, you can add appropriate titles and units to the coordinate axes, and adjust the vertical axis range according to the data distribution to avoid excessive blank spaces in the chart or excessive data compression. In the drawing details settings, you can also modify the column width, spacing, color fill, and border style to improve the aesthetics and readability of the graph. If the category label is too long, you can improve the display effect by rotating the horizontal axis text or setting the line break method.
5、美化与导出图像(Beautify and export images)
在完成基本设置之后,可以在图表中加入必要的注释或说明,并检查整体排版是否清晰合理。若图表样式已经符合需求,可将其保存为模板,以便后续快速调用。最后,根据具体用途将图表导出为高分辨率的图片或矢量格式文件,常用的格式有TIFF、PNG和PDF,便于直接嵌入论文或技术报告中。
After completing the basic settings, you can add any necessary annotations or explanations to the chart and check the overall layout for clarity and rationality. If the chart style meets your needs, you can save it as a template for quick access later. Finally, depending on the specific application, export the chart as a high-resolution image or vector format file. Common formats include TIFF, PNG, and PDF, making it easy to embed directly into papers or technical reports.
6、最终图像(Final image)
今天的分享就到这里了,
如果您对文章有独特的想法,
欢迎给我们留言,
让我们相约明天。
祝您今天过得开心快乐!
That's all for today's sharing.
If you have a unique idea about the article,
please leave us a message,
and let us meet tomorrow.
I wish you a nice day!
翻译:Google翻译
参考资料:维基百科、CSDN社区、Chatgpt、OriginLab官网
本文由LearningYard学苑整理发出,如有侵权请在后台留言!
文案|chen
排版|chen
审核|hzy
来源:LearningYard学苑