python - Editing the x-axis tick labels of a stacked bar graph in matplotlib -
i have written code produce stacked bar graph plots 192 bars of data. data spans on 4 days, , each bar represents 30 minute time period.
the graph produces 192 tick labels overlap each other undesirable appearance-wise.
to fix this, have added following lines code:
myfmt = mdates.dateformatter('%d')
ax.xaxis.set_major_formatter(myfmt)
i want have 1 tick label each day, matplotlib automatically generates unwanted, tick labels when graph spans on 4 days or less. problem doesn't happen when there 5 or more days. there way can force graph have 1 tick each day?
Comments
Post a Comment