shplot.profiles.builtin¶
CUD_PALETTE
¶
Color Universal Design (CUD) palette.
This is a palette that is unambiguous to both colorblind and non-colorblind people. See https://jfly.uni-koeln.de/color/ for details.
SH_BUILTIN_PROFILES: dict[str, collections.abc.Callable[..., shplot.profiles._interface.PlottingProfile]]
¶
Built-in plotting profiles with set values for different contexts.
sh_rc_overrides
¶
ShLightCUDProfile (ColorProfile)
¶
Black on white color profile with CUD palette.
BSLightCUDProfile (ColorProfile)
¶
Bootstrap light theme color profile with CUD palette.
BSDarkCUDProfile (ColorProfile)
¶
Bootstrap dark theme color profile with CUD palette.
ShScaleProfile (PlotScaleProfile)
¶
Builder for scale profiles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fs |
float |
Base font size (in points). |
required |
fs_small |
float |
Small font size (in points). |
required |
fs_smaller |
float |
Smaller font size (in points). |
required |
fs_large |
float |
Large font size (in points). |
required |
marker_size |
float |
Default marker size (in points). |
required |
line_width |
float |
Default line width (in points). |
required |
full_width_in |
float |
Default figure width (in inches). |
required |
ShPaperScaleProfile (ShScaleProfile)
¶
Scale profile for a 10pt document.
Font sizes correspond to relative LaTeX font sizes for 10pt documents:
- \normalsize: 10pt
- \small: 9pt
- \footnotesize: 8pt
- \large: 12pt
ShBookScaleProfile (ShScaleProfile)
¶
Scale profile for a 12pt document.
Font sizes correspond to relative LaTeX font sizes for 12pt documents:
- \normalsize: 12pt
- \small: 10.95pt
- \footnotesize: 10pt
- \large: 14.4pt
ShWebScaleProfile (_ShWebScaleProfile)
¶
Scale profile for display on the web.
Sizes are for a 16px font size at 96dpi (CSS reference px).
ShPresentationScaleProfile (_ShWebScaleProfile)
¶
Scale profile for presentations.
Sizes are based on 48px font size, and will be scaled based on dpi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dpi |
float |
Scale for converting pixel sizes to points. |
required |
ShFontsetupFontProfile (FontProfile)
¶
LaTeX font profile using the fontsetup package.
See https://www.ctan.org/pkg/fontsetup for details on the package. This profile simply sets the latex preamble to load the package with the given font.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
font |
FontType |
One of the fonts supported by fontsetup. This value is passed as the sole argument to the package. |
'default' |
FontType
¶
ShPGFRcFontsFontProfile (FontProfile)
¶
LaTeX font profile combining fontsetup with system fonts.
This profile loads the fontsetup package with the given font as in
ShFontsetupFontProfile, but also sets pgf.rcfonts to True,
so that Matplotlib will insert fontspec commands into
the LaTeX preamble to set serif/sans-serif/monospace fonts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
family |
Literal['serif', 'sans-serif', 'monospace'] |
Default font family. |
'serif' |
base_font |
ShFontsetupFontProfile.FontType |
One of the fonts supported by fontsetup. This value is passed as the sole argument to the package. |
'default' |
serif |
Optional[str] |
Override for serif font. If |
None |
sans_serif |
Optional[str] |
Override for sans-serif font. If |
None |
monospace |
Optional[str] |
Override for monospace font. If |
None |
ShPrintAxesProfile (AxesProfile)
¶
Axes profile for print.
ShWebAxesProfile (AxesProfile)
¶
Axes profile for web.
ShPresentationAxesProfile (AxesProfile)
¶
Axes profile for presentation.
ShPaperProfile (_ShFontsetupProfile)
¶
Profile for generating figures for a paper (10pt).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fontname |
ShFontsetupFontProfile.FontType |
Name of the font to use–see |
'default' |
**rc_extra |
Any |
|
{} |
ShBookProfile (_ShFontsetupProfile)
¶
Profile for generating figures for a book (12pt).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fontname |
ShFontsetupFontProfile.FontType |
Name of the font to use–see |
'default' |
**rc_extra |
Any |
|
{} |
ShWebProfile (PlottingProfile)
¶
Profile for generating figures for the web.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theme |
Literal['light', 'dark'] |
Color theme–‘light’ will generate figures on a light background, and ‘dark’ will generate figures on a dark background. |
required |
font_family |
Literal['serif', 'sans-serif', 'monospace', 'fantasy', 'cursive'] |
Default font family. |
'sans-serif' |
sans_serif_font |
Optional[str] |
Optional override for default sans-serif font. |
None |
serif_font |
Optional[str] |
Optional override for default serif font. |
None |
monospace_font |
Optional[str] |
Optional override for default monospace font. |
None |
cursive_font |
Optional[str] |
Optional override for default cursive font. |
None |
fantasy_font |
Optional[str] |
Optional override for default fantasy font. |
None |
math_font |
Optional[Literal['dejavusans', 'dejavuserif', 'cm', 'stix', 'stixsans']] |
Optional override for default math font. |
None |
**rc_extra |
Any |
|
{} |
ShPresentationProfile (PlottingProfile)
¶
Profile for generating figures for presentations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
font_family |
Literal['serif', 'sans-serif', 'monospace'] |
Default font family. |
'sans-serif' |
base_font |
ShFontsetupFontProfile.FontType |
See |
'default' |
serif_font |
Optional[str] |
See |
None |
sans_serif_font |
Optional[str] |
See |
None |
monospace_font |
Optional[str] |
See |
None |
dpi |
Union[float, str] |
See |
200.0 |
**rc_extra |
Any |
|
{} |