Skip to content

Clarify/Improve docs on family-names vs generic-families#20346

Merged
jklymak merged 2 commits intomatplotlib:masterfrom
aitikgupta:font-docs
Jun 11, 2021
Merged

Clarify/Improve docs on family-names vs generic-families#20346
jklymak merged 2 commits intomatplotlib:masterfrom
aitikgupta:font-docs

Conversation

@aitikgupta
Copy link
Contributor

@aitikgupta aitikgupta commented Jun 2, 2021

PR Summary

Coming from the answer at https://discourse.matplotlib.org/t/fonts-and-font-families/22132 and a brief discussion with @anntzer, this PR modifies the content of font docs (and one example, for which I have a slight niggle against - because it's not really the most obvious and best way to guide a user into setting font family).

Hopefully, we might be moving font stuff out from this very long page, and probably a better example in future.

This is possibly the beginning of handling #5941.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

Looks good to me, but perhaps someone less familiar with fonts should check whether this looks like an improvement to them :)

jklymak
jklymak previously requested changes Jun 8, 2021
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

I think I'm ignorant enough about what is going on to say this raises more questions than it answers ;-). Apologies if this is explained elsewhere and I just could not find it.

I also am not at all sure this belongs in a tutorial called text_props. But maybe re-org can happen later? I think the tutorial should have "font" in the title somewhere....

@aitikgupta
Copy link
Contributor Author

aitikgupta commented Jun 9, 2021

^reworded sentences as per @jklymak's suggestions.

I also am not at all sure this belongs in a tutorial called text_props. But maybe re-org can happen later? I think the tutorial should have "font" in the title somewhere....

Yes, I think that's definitely something which we should consider, though we should discuss where and how exactly font-related docs could be abstracted/put.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

This seems better to me, thanks!

@jklymak jklymak dismissed their stale review June 9, 2021 13:53

Review changes made

@tacaswell
Copy link
Member


/home/circleci/project/doc/tutorials/text/text_props.rst:219: WARNING: undefined label: /tutorials/introductory/customizing
generating indices... genindex py-modindex done

These failures look real and related.

@aitikgupta
Copy link
Contributor Author

These failures look real and related

Yeah even I was confused when I first saw it, it's basically coming from

# (mentioned at :ref:`default rcParams </tutorials/introductory/customizing>`)

Is there any other way we can reference this link: https://matplotlib.org/stable/tutorials/introductory/customizing.html?

@jklymak
Copy link
Member

jklymak commented Jun 11, 2021

Aren't those usually :doc:? though I've not seen the form where you make it a link to alternate text...

Edit: see contour_demo.py for

:doc:`default rcParams </tutorials/introductory/customizing>`

seeming to work. Sorry I don't know why :ref: doesn't work...

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Anyone can merge when CI passes, though @aitikgupta you may want to squash your commits?

@aitikgupta
Copy link
Contributor Author

I was waiting for tests to pass first, but I can squash and push right now?

@jklymak
Copy link
Member

jklymak commented Jun 11, 2021

I don't think there is any reason for CI to run twice, unless you want to keep the commits around for some reason.

@jklymak jklymak merged commit 02f2ea7 into matplotlib:master Jun 11, 2021
@jklymak
Copy link
Member

jklymak commented Jun 11, 2021

Thanks @aitikgupta - looks helpful!

@QuLogic QuLogic added this to the v3.5.0 milestone Jun 11, 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.

5 participants