File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2525 ax .set_xscale ('log' )
2626
2727# Demo of the default settings, with a user-defined unit label.
28- ax0 .set_title ('Full unit ticklabels, w/ default precision & space sep. ' )
28+ ax0 .set_title ('Full unit ticklabels, w/ default precision & space separator ' )
2929formatter0 = EngFormatter (unit = 'Hz' )
3030ax0 .xaxis .set_major_formatter (formatter0 )
3131ax0 .plot (xs , ys )
3232ax0 .set_xlabel ('Frequency' )
3333
3434# Demo of the options `places` (number of digit after decimal point) and
35- # `space_sep` (presence of a space between the number and the prefix/unit).
36- ax1 .set_title ('SI-prefix only ticklabels, 1-digit precision & w/o space sep.' )
37- formatter1 = EngFormatter (places = 1 , space_sep = False )
35+ # `sep` (separator between the number and the prefix/unit).
36+ ax1 .set_title ('SI-prefix only ticklabels, 1-digit precision & ' +
37+ 'hair space separator' )
38+ formatter1 = EngFormatter (places = 1 , sep = u"\u200a " ) # U+200A is hair space
3839ax1 .xaxis .set_major_formatter (formatter1 )
3940ax1 .plot (xs , ys )
4041ax1 .set_xlabel ('Frequency [Hz]' )
You can’t perform that action at this time.
0 commit comments