简体   繁体   中英

Gaps in bar plot in matplotlib

I am trying to plot time series data with x axis being dates and y axis being 'daily new covid cases'. But some unwanted gaps occur (see the image below). There is no missing values either (see the last image). The same data when plotted with numbers on the x axis works fine and there is no discontinuity as well. How do I fix this?

Note: Same result happens even if i set width=1 in the bar plots

在此处输入图像描述

在此处输入图像描述

I am trying to plot time series data with x axis being dates and y axis being 'daily new covid cases'. But some unwanted gaps occur (see the image below). There is no missing values either (see the last image). The same data when plotted with numbers on the x axis works fine and there is no discontinuity as well. How do I fix this?

Note: Same result happens even if i set width=1 in the bar plots

在此处输入图像描述

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM