Basically, when generating plots with matplotlib, The scale on the y-axis goes into the millions. How do I turn on digit grouping (i.e. so that 1000000 displays as 1,000,000) or turn on the decimal separator?
Basically, when generating plots with matplotlib, The scale on the y-axis goes into the
Share
I don’t think there’s a built-in function to do this. (That’s what i thought after i read your Q; i just checked and couldn’t find one in the Documentation).
In any event, it’s easy to roll your own.
(Below is a complete example–ie, it will generate an mpl plot with one axis having commified tick labels–although five lines of code are all you need to create custom tick labels–three (including import statement) for the function used to create the custom labels, and two lines to create the new labels and place them on the specified axis.)