![]() ScalarFormatter: Default formatter for scalars: auto-pick the format string. StrMethodFormatter: Use string str.format method.įormatStrFormatter: Use %-style formatting.įuncFormatter: Define labels through a function.įixedFormatter: Set the label strings explicitly. The tick format is configured via the function set_major_formatterĪ format string, which implicitly creates a StrMethodFormatter.Ī function, implicitly creates a FuncFormatter.Īn instance of a Formatter subclass. ![]() Similarly, we can specify "Formatters" for the major and minor ticks on each LogLocator ( base = 10, numticks = 15 )) plt. MaxNLocator ( 40 )) # Log Locator setup ( axs, title = "LogLocator(base=10, numticks=15)" ) axs. ![]() AutoMinorLocator ()) # MaxN Locator setup ( axs, title = "MaxNLocator(n=4)" ) axs. IndexLocator ( base = 0.5, offset = 0.25 )) # Auto Locator setup ( axs, title = "AutoLocator()" ) axs. plot ( range ( 0, 5 ), * 5, color = 'white' ) axs. LinearLocator ( 31 )) # Index Locator setup ( axs, title = "IndexLocator(base=0.5, offset=0.25)" ) axs. linspace ( 0.2, 0.8, 4 ))) # Linear Locator setup ( axs, title = "LinearLocator(numticks=3)" ) axs. MultipleLocator ( 0.1 )) # Fixed Locator setup ( axs, title = "FixedLocator()" ) axs. NullLocator ()) # Multiple Locator setup ( axs, title = "MultipleLocator(0.5)" ) axs. subplots ( 8, 1, layout = 'constrained' ) # Null Locator setup ( axs, title = "NullLocator()" ) axs. transAxes, fontsize = 14, fontname = 'Monospace', color = 'tab:blue' ) fig, axs = plt. text ( 0.0, 0.2, title, transform = ax. tick_params ( which = 'minor', width = 0.75, length = 2.5 ) ax. tick_params ( which = 'major', width = 1.00, length = 5 ) ax.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |