8000 Add "sans" alias to rc() to allow users to set font.sans-serif by founta · Pull Request #30030 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add "sans" alias to rc() to allow users to set font.sans-serif #30030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,17 +995,18 @@ def rc(group, **kwargs):

The following aliases are available to save typing for interactive users:

===== =================
====== =================
Alias Property
===== =================
====== =================
'lw' 'linewidth'
'ls' 'linestyle'
'c' 'color'
'fc' 'facecolor'
'ec' 'edgecolor'
'mew' 'markeredgewidth'
'aa' 'antialiased'
===== =================
'sans' 'sans-serif'
====== =================

Thus you could abbreviate the above call as::

Expand Down Expand Up @@ -1039,6 +1040,7 @@ def rc(group, **kwargs):
'ec': 'edgecolor',
'mew': 'markeredgewidth',
'aa': 'antialiased',
'sans': 'sans-serif',
}

if isinstance(group, str):
Expand Down
Loading
0