python - How to avoid axis values with 1e7 in pandas and matplotlib -
By using the code given below it produces a plot where the y-axis is 0.0 to 2.5 1e7. How can values be saved with 1e7? Import Pond as PD imports as plpl a = {'test1'}: {1: 21867186, 4: 20145576, 10: 18018537}, 'Test2': {1: 23256313, 4: 21668216, 10: 19795367}} d = pd.DataFrame (a). #print df = plt.figure () plt.title ('title here!', Color = 'black') d.plot (type = 'bar', ax = f.gca ()) plt.show ()
like the example below I hope you only want this. ticklabel_format (style = 'plain') .
Import pandas as pd import matplotlib.pyplot as plt a = {'test1': {1: 21867186, 4: 20145576, 10: 18018537}, 'Test 2': {1 : 23256313, 4: 21668216, 10: 19795367}} d = pd.DataFrame (A). T # printing df = plt.figure () plt.ticklabel_format (style = 'plain') plt.title ('title here!', Color = 'black') d.plot (kind = 'bar', ax = f. GCA () plt.show ()
Comments
Post a Comment