You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I can't account for the specific choice of limits, I gather that the first plot sets the units on the axes in a way that interferes with the subsequent plot. And indeed, we can fix the problem by setting a dtype on our null data.
In summary, I think Case 1 is not a bug (it would be nice to defer unit setting for empty data, but I can easily imagine that this is hard/impossible). But I can't account for Case 3.
Bug report
Bug summary
The automatic limits for datetime axes depend in surprising ways on the presence of artists without any data.
Code for reproduction
Case 1:
If a datetime plot follows an empty plot, the autoscaling on the date axis are not what one would expect:
While I can't account for the specific choice of limits, I gather that the first plot sets the units on the axes in a way that interferes with the subsequent plot. And indeed, we can fix the problem by setting a dtype on our null data.
Case 2:
But this does not work for all functions. Consider the case of
fill_between
.Case 3:
In summary, I think Case 1 is not a bug (it would be nice to defer unit setting for empty data, but I can easily imagine that this is hard/impossible). But I can't account for Case 3.
Matplotlib version
print(matplotlib.get_backend())
): pylab inlineThe text was updated successfully, but these errors were encountered: