海报质量出版图表
好的,我有以下数据,我需要与条形图一起绘制条形图。
import pandas as pd
import matplotlib.pyplot as plt
data1 = {'Mode': ['foot', 'bike', 'bus', 'car', 'metro'],
'Segments': [4443, 306, 1070, 5947, 322]}
data2 = {'Mode': ['foot', 'bike', 'bus', 'car', 'metro'],
'Segments': [2224, 132, 817, 2078, 179]}
因此,我希望将这些dfs
的绘图条形图绘制到我在方法论部分下的海报(部分左栏)的一部分,以便可读。
我在Google表中创建了上图,但是将其插入海报模板时不可读取(在Google幻灯片中可用)。
如果相关,我的海报模板具有以下字体尺寸:
Title = 85 points
Author = 56 points
Headings = 78 points
sub-headings = 36 points
body text = 30 points
OK, I have the following data, that I needed to plot bar chart with.
import pandas as pd
import matplotlib.pyplot as plt
data1 = {'Mode': ['foot', 'bike', 'bus', 'car', 'metro'],
'Segments': [4443, 306, 1070, 5947, 322]}
data2 = {'Mode': ['foot', 'bike', 'bus', 'car', 'metro'],
'Segments': [2224, 132, 817, 2078, 179]}
So I want plot bar chart of these dfs
to a section of my poster (left column of section) under methodology section,such that it is readable.
I created the above chart in Google sheet, but it is not readable when inserted to poster template (available in Google slides).
If relevant, my poster template has the following font sizes:
Title = 85 points
Author = 56 points
Headings = 78 points
sub-headings = 36 points
body text = 30 points
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
plt.rcparams
来指定所需的样式。首先,定义这些图应为的实际尺寸。例如,如果您的海报有1M的宽度,两列,并且您并排放置两个条形图,则其宽度约为9x8英寸。然后,您可以将标签和刻度设置为您想要的尺寸,例如,文本为30点。在代码开头执行此操作,然后进行图。例如:结果:
现在是您造型颜色/等的问题,以更好地匹配其余的您的海报,然后导出您的数字并将其移至Google幻灯片。
You can specify the styles you want with
plt.rcParams
. First, define the actual size these graphs should be. For example, if your poster has 1m of width, two columns, and you're placing two barplots side by side, then their widths would be about 9x8 inches. Then, you can set the labels and ticks and so on to the size you want, for example, 30 points for text. Do this in the beginning of your code, then do your plots. For example:Resulted in this:
Now it's a matter of you styling the colors/etc to better match the rest of your poster, then exporting your figures and moving them to Google Slides.