Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f0d62eb

Browse filesBrowse files
authored
Merge pull request #13467 from anntzer/textc
Add "c" shorthand for "color" for the Text class.
2 parents a276243 + 1a4a897 commit f0d62eb
Copy full SHA for f0d62eb

File tree

Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
`Text` gained the ``c`` alias for the ``color`` property
2+
````````````````````````````````````````````````````````
3+
4+
For consistency with `Line2D`, the `Text` class gained the ``c``
5+
alias for the ``color`` property; one is thus now allowed to write
6+
``ax.text(.5, .5, "foo", c="red")``.

‎lib/matplotlib/text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/text.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def _get_textbox(text, renderer):
9696

9797

9898
@cbook._define_aliases({
99+
"color": ["c"],
99100
"fontfamily": ["family"],
100101
"fontproperties": ["font_properties"],
101102
"horizontalalignment": ["ha"],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.