在直方图python(JES)中添加“刻度线”

时间:2017-05-25 08:11:30

标签: python python-3.x histogram jes

嗨大家好抱歉,如果不好的问题,但我有这个直方图(附图)我需要在我的代码中以某种方式包括水平轴上的'刻度线'以及数字0,2,4,,6,8,10 ,10是我的例子中的最大值。

我不知道如何添加这些刻度标记我不能使用导入,dicts,类似的东西。我最接近的想法是包括

在内的一些循环
[1051910.230] (II) config/udev: Adding input device PenMount Serial >TouchScreen(/dev/input/event3)
[1051910.230] (II) AutoAddDevices is off - not adding device.
[1051910.232] (II) config/udev: Adding input device PenMount Serial TouchScreen (/dev/input/mouse0)
[1051910.232] (II) AutoAddDevices is off - not adding device.
[1051910.237] (II) config/udev: Adding input device ltc2954 (/dev/input/event2)
[1051910.237] (II) AutoAddDevices is off - not adding device.

其中max和min是水平轴的起点和终点。

已经盯着这一个星期超过一个星期,这是最后一块,我正在画一个空白,所以任何帮助都会非常感激!

enter image description here

1 个答案:

答案 0 :(得分:0)

要自定义刻度线的外观,可以使用 Axes.tick_params()方法。

前:

fig, ax = plt.subplots()
ax.plot(datasetname['Bronze'],women_degrees['Craft'],label='datasetname')
ax.tick_params(bottom="on", top="off", left="on", right="off")
plt.show()
相关问题