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)
845 Uncaught (inpromise) Error on Electron: An object could not be cloned
1225 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
768 GDB gets version error when attempting to debug with the Presense SDK (IDE)
765 M2 Mac fails to install rbenv install 3.1.3 due to errors
© 2025 OneMinuteCode. All rights reserved.