2017-08-04 1 views

Antwort

2

hilft Sie können dies mit matplotlib.pyplot.ticklabel_format erreichen sein sollte:

import matplotlib.pyplot as plt 
df = pd.read_csv('housing.csv') 
g = sns.distplot(df['MEDV']) 
plt.ticklabel_format(style='sci', axis='both', scilimits=(0,0)) 

Output Image

Lassen Sie mich wissen, wenn Sie das suchen! Und viel Glück!

+0

Wie ist verwandt g = sns.distplot (df ['MEDV']) mit plt.ticklabel_format()? Ich sehe g nirgendwo anders? –

+1

Ich glaube, dass es nur das Standard-Ticklabel-Format für alle Matplotlib-Plots ändert. Wenn Sie zum Beispiel das 'plt.ticklabel_format (style = 'sci', axis = 'both', scilimits = (0,0)' ganz am Anfang des Codes ausführen, funktioniert es genauso. Mehr Einstellungen Änderung als eine Grafikänderung. – CalendarJ

2

Sie können einfach die Serie teilen, indem er 100 dh

sns.distplot(df['MEDV']/100) 
plt.show() 

enter image description here Hoffe, dass es

Verwandte Themen