python - How do I set the increment in a graph in matplotlib -


I am drawing and drawing a graph in the matplotlib in Python, and I can not understand how to stop the Y axis Representing itself in the context of multiples of e The Y axis I am receiving is between 0.01 and 0.05, with the + 2.288 E1 at the top of the axis. They actually map around 20 "intelligent" values. How can I force matplotlib to not use this notation?

  DIG plot time (A, AKNAM, B, BN, GRAPHITAL): print print if max (A)> gt; = Max (b): plt.axhline (max (a), color = 'r') Other: plt.axhline (max (b), color = 'r') if maximum (a) & gt; = Max (B): plt.axhline (max (a), color = 'r') Other: plt.axhline (max (b), color = 'r') a, = plt.plot (a) B, = Plt.plot (b) plt.legend ([a, b], [aName, bName]) plt.suptitle (graphTitle, fontsize = 20) plt.ylabel ('time (min)') plt.xlabel ('Xth file Created ') plt.show () return  

You can zoom in with an explanation Using the axis limit:

  plt.ticklabel_format (axis = 'y', style = 'plain', scalimits = (- 2) 2)  
< P> You can also see another way to solve it by adding:

  plt.gca (). Get_yaxis (). Get_major_formatter () Set_use Offset (incorrect) p Try also to represent vertically in order to avoid overlapping text (but this is still a suggestion). Get_xaxis (). Get_xaxis (). Get_major_formatter () Set_useoffset (false)  

.

  plt.yticks (rotation = 'vertical')  

Comments