Module reference
The atlasify package provides the method atlasify() which applies ATLAS style to matplotlib plots.
- class atlasify.AtlasStyle(**kwds)
Helper class to work with multiple styles
- apply(*args, **kwds)
Arguments are passed to atlasify() with constructor kwds as fallback.
- atlasify.atlasify(atlas=True, subtext: str = None, enlarge: float = None, axes: <module 'matplotlib.axes' from '/home/docs/checkouts/readthedocs.org/user_builds/atlasify/envs/stable/lib/python3.9/site-packages/matplotlib/axes/__init__.py'> = None, outside: bool = False, font_size: Optional[int] = None, label_font_size: Optional[int] = None, sub_font_size: Optional[int] = None, indent: Optional[float] = None, offset: Optional[float] = None, major_tick_length: Optional[float] = None, minor_tick_length: Optional[float] = None, line_spacing: Optional[float] = None, brand: Optional[str] = None, subtext_distance: float = 0)
Applies the atlas style to the plot.
- atlasstr or bool, optional
If the argument evaluates to true, the ATLAS badge is added. If a non-empty string is provided, the string is appended after the badge, by default True
- subtextstr, optional
Text which is put below the badge. Multiple lines are printed separately. By default None
- enlargefloat, optional
Defines how far the y-axis should be extended to accommodate for the badge. By default, this is set to 1.3 if outside is False.
- axesmatplotlib.axes, optional
Axis you want to atlasify. By default, the currently active axis is used
- outsidebool, optional
If True, the label will be placed above the plot. By default False
- font_sizeint, optional
Font size of the ATLAS badge itself, by default 16
- label_font_sizeint, optional
Font size of the text after the badge, by default 16
- sub_font_sizeint, optional
Font size of the subtext, by default 12
- indentfloat, optional
Horizontal offset of the badge, by default 8
- offsetfloat, optional
Vertial offset of the badge, by default 5
- major_tick_lengthfloat, optional
Length of the major axis ticks, by default 6
- minor_tick_lengthfloat, optional
Length of the minor axis ticks, by default 3
- line_spacingfloat, optional
Spacing between baseline of sub-text in units of font, by default 1.2
- brandstr, optional
The branding of the badge, by default “ATLAS”
- subtext_distancefloat, optional
Additional distance between the first line and the subtext in units of line spacing (measured from the top left of the badge), by default 0
- atlasify.atlasify_legend(axes)
Removes the frame from existing legend and enables legend if there are more then two handles. The location of a pre-exisitng legend is not changed.
- atlasify.enlarge_yaxis(axes, factor=1)
Enlarges the y-axis by the given factor. A factor of 1 has no effect. The lower boundary of the y-axis is not affected.
- atlasify.monkeypatch_axis_labels()
Monkeypatch the
matplotlib.axes.Axes.set_(xy)labels
methods to have default alignment top and right.
- atlasify.set_xlabel(axes, label, *args, **kwargs)
Set an x-label on a plot, and align it to the right. All arguments are forwarded.
- atlasify.set_ylabel(axes, label, *args, **kwargs)
Set an y-label on a plot, and align it to the top. All arguments are forwarded.