I used plt.xticks (rotaion=90) to rotate the X axis in matplot.
The label will be printed on the jupyter notebook using plt.xticks().
I don't want this print statement to be displayed because I'm creating a report on the jupyter notebook.
Is there any way?
Thank you for your cooperation.
The following code
import numpy as np
import pandas aspd
import matplotlib.pyplot asplt
import seaborn as sns
import japanize_matplotlib
data=pd.DataFrame ([[1,2], [4,5], [6,7]], columns=['x', 'y'])
data.plot()
plt.xticks (rotation=90)
(array([0., 0.25, 0.5, 0.75, 1.75, 1.25, 1.5, 1.75, 2.],
<a list of 9 Textxticklabel objects>)
I don't want to show the .
python matplotlib
plt.xticks(rotation=90)
followed by ;
(semi-colon), or add plt.show()
to the last line.
For example, store the return value in a variable (rather than leaving it thrown).
_=plt.xticks(rotation=90)
© 2024 OneMinuteCode. All rights reserved.