i'm trying make frequency plot special x-axis request based on following pandas table.
pos freq 0 67 1 1 285 5 2 288 1 3 397 4 4 592 1 5 640 3
since frequency integers (pos column), hope have x-axis normal continuous numeric labels. however, simple bar plot:
plot_pos=pos_freq.plot(kind='bar',x='pos')
i x-axis labeled 67, 285, 288, 397, 592, 640. instead, x-axis series of continuous integers/intervals, e.g. 60, 65, 70, 75, ....645, 650; , frequency bars still shown @ correct positions.
i'm not sure if bar plot choice @ point, , i'm new plotting in python. (i in excel; or can add x-axis...) suggestion better method appreciated!
with matplotlib
,
import matplotlib.pyplot plt plt.bar(pos_freq['pos'], pos_freq['freq']) plt.show()