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
x=pd.Series([False,True,True,False])
x.plot()
# Error thrown!# Running version 0.24.2
Problem description
It would be nice to be able to directly use .plot() on true / false masks. Matplotlib currently supports plotting true / false masks with the below code (using the same x variable as above):
plt.plot(x.index, x.values)
Expected Output
Would be great if the code in the "code sample" section outputted the same as the matplotlib equivalent of ( plt.plot(x.index, x.values) ), where True translates to 1, and False to zero, and plots against the index values of the series.
Code Sample, a copy-pastable example if possible
Problem description
It would be nice to be able to directly use .plot() on true / false masks. Matplotlib currently supports plotting true / false masks with the below code (using the same x variable as above):
plt.plot(x.index, x.values)
Expected Output
Would be great if the code in the "code sample" section outputted the same as the matplotlib equivalent of ( plt.plot(x.index, x.values) ), where True translates to 1, and False to zero, and plots against the index values of the series.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.13.final.0
python-bits: 64
OS: Windows
OS-release: 10
pandas: 0.24.2
numpy: 1.16.4
scipy: 1.2.2
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: