简体   繁体   中英

Cufflink plot changing the axis scale

I am plotting a pivot chart using cufflinks.Code is given below.

df_thd_funct_dbspl = pd.read_csv("THD_M2.txt",delim_whitespace=True)
check_for_nan = df_thd_funct_dbspl.isnull().values.any()
print (check_for_nan)
df_thd_funct_dbspl.head()
Head_Values_dB = list(df_thd_funct_dbspl.columns.values)
Head_Values_minus_First_Column_dB = Head_Values_dB[3:]

THD_Mode1_Funct_PVT = pd.pivot_table(df_thd_funct_dbspl, index = ['IN_dB_SPL'],values = Head_Values_minus_First_Column_dB)
THD_Mode1_Funct_PVT['SPEC MAX'] = 10
THD_Mode1_Funct_PVT.iplot()

My plot is given below.You can see that X axis starts from 95 then 100 105 and so on with a difference of 5.

I need the axis to be 95,96,..with a difference of 1.May I know how to approach this.

在此处输入图像描述

You can change the step size of the x-axis by dtick :

table.iplot(layout={"xaxis":{"dtick":1}})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM