Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add a third party package in the doc: matplotlib-scalebar #15537

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 2 commits into from
Oct 27, 2019
Merged

Add a third party package in the doc: matplotlib-scalebar #15537

merged 2 commits into from
Oct 27, 2019

Conversation

ppinard
Copy link
Contributor

@ppinard ppinard commented Oct 27, 2019

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@ppinard
Copy link
Contributor Author

ppinard commented Oct 27, 2019

PR in response to ppinard/matplotlib-scalebar#21

Copy link
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.

Thanks! Could you please try to reduce the png file size. We've got a number of images on that page and we try to be nice to users with limited bandwidth.

Might scale down a bit, but more importantly, there are a number of online png compressors. Running the image through one of these should significantly reduce the size (you may also try different ones if you are interested, as not all compressors are equally good).

@ppinard
Copy link
Contributor Author

ppinard commented Oct 27, 2019

@timhoffm I was able to reduce the size by ~5. I decreased the resolution by 2 and using Gimp I converted the image to greyscale and applied the highest compression.

@ppinard
Copy link
Contributor Author

ppinard commented Oct 27, 2019

The original image is from Wikipedia Commons and it is in in the Public Domain: https://commons.wikimedia.org/wiki/File:Gold_on_Carbon.jpg

@tacaswell tacaswell added this to the v3.2.0 milestone Oct 27, 2019
@tacaswell tacaswell merged commit 6e90310 into matplotlib:master Oct 27, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 27, 2019
@tacaswell
Copy link
Member

Thanks @ppinard !

@timhoffm
Copy link
Member

timhoffm commented Oct 28, 2019

@tacaswell I'm afraid the merge was a bit too fast.

  • The image is not optimal:

    • JPG would be more suited for such an image.
    • The image has not gone through a compressor. (There are optimizations to reduce image size apart from the compression level).

    A visually equivalent (compressor post-processed) JPG would be 13kb instead of 33kb.

  • The ReST code forces an image height of 200px while the actual image is just 150px. This upscaling degrades quality visibly. We should show the image in it's original size. So either use a larger image or make it smaller in the docs.

Given that this is already merged, how do we proceed from here? Is there any way of replacing that image without carrying the unused version in the repo for eternity and without breaking existing clones?

Edit: On a side-note, the above issues are present for a number of images on https://matplotlib.org/devdocs/thirdpartypackages/index.html. Changing them would be a separate matter of discussion.

@tacaswell
Copy link
Member

Push a new PR to fix those things and once that is merged add it to the backport PR.

@ppinard
Copy link
Contributor Author

ppinard commented Oct 28, 2019

I will make a new PR today.

timhoffm added a commit that referenced this pull request Oct 29, 2019
…537-on-v3.2.x

Backport PR #15537 on branch v3.2.x (Add a third party package in the doc: matplotlib-scalebar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants