May-30-2023, 07:59 AM
Does anyone know how to resize the bottom of my x-axis u, it seem like the x-axis all text word is showing all of them out.
datetime Tput
20230419.172914.301607 0.000287
20230419.172924.301733 0.000993
20230419.172934.301880 0.00074
20230419.172944.302017 0.00074
please refer to my attached xaxis.PNG as you can see below xaxis text or word beginning seem not showing, how to show.
If use the setting to set like adjust_bottom.PNG , when moving the bottom to right the word will display, but the whole page will effect.
is there any way to solve showing the xaxis word
import pandas as pd import matplotlib.pyplot as plt import numpy as np # Read the Excel file into a pandas DataFrame data = pd.read_excel('1.xlsx') # Extract datetime and Tput columns datetime = data['datetime'] tput = data['Tput'] # Convert the datetime column to numeric values using NumPy x = np.arange(len(datetime)) # Plot the line graph plt.plot(datetime, tput) plt.xlabel('time') plt.ylabel('Tput') plt.title('TPUT') plt.xticks(rotation=90, fontsize=12) plt.show()My excel contains data like this:
datetime Tput
20230419.172914.301607 0.000287
20230419.172924.301733 0.000993
20230419.172934.301880 0.00074
20230419.172944.302017 0.00074
please refer to my attached xaxis.PNG as you can see below xaxis text or word beginning seem not showing, how to show.
If use the setting to set like adjust_bottom.PNG , when moving the bottom to right the word will display, but the whole page will effect.
is there any way to solve showing the xaxis word