Skip to content

[Doc] colors.to_hex input & output#20913

Merged
timhoffm merged 4 commits intomatplotlib:masterfrom
story645:story645-to_hex
Sep 13, 2021
Merged

[Doc] colors.to_hex input & output#20913
timhoffm merged 4 commits intomatplotlib:masterfrom
story645:story645-to_hex

Conversation

@story645
Copy link
Copy Markdown
Member

@story645 story645 commented Aug 26, 2021

added numpydoc style documentation of parameters to the colors.to_hex function


Parameters
----------
c : Matplotlib color or ``np.ma.masked``
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just "color" (we say "color" in a bunch of doc descriptions to mean "matplotlib color"; this is not different).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was super confused by what is color - RGBA, named, all of the above? (should color maybe cross link to https://matplotlib.org/devdocs/tutorials/colors/colors.html?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, but that should probably be another discussion, similar to the joinstyle/capstyle one.

Copy link
Copy Markdown
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like :rc:`some.param` , we should have a :concept:`color` directive (or similar) to make such links easier. But until then an explicit link is ok as well.

story645 and others added 2 commits August 26, 2021 23:06
``#rrggbbaa`` otherwise.
Parameters
----------
c : :doc:`color </tutorials/colors/colors>` or `np.ma.masked`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
c : :doc:`color </tutorials/colors/colors>` or `np.ma.masked`
c : :doc:`color </tutorials/colors/colors>` or `numpy.ma.masked`

Sorry, need the original name to make the link working.

@timhoffm timhoffm added this to the v3.5.0 milestone Sep 13, 2021
@timhoffm timhoffm merged commit 20170d7 into matplotlib:master Sep 13, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 13, 2021
@story645 story645 deleted the story645-to_hex branch September 13, 2021 16:41
dstansby added a commit that referenced this pull request Sep 13, 2021
…913-on-v3.5.x

Backport PR #20913 on branch v3.5.x ([Doc] colors.to_hex input & output)
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
[Doc] colors.to_hex input & output
ericpre pushed a commit to ericpre/matplotlib that referenced this pull request Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants