-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH new static images for the frontpage #7541
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
Conversation
Here is the code to produce the new static images for the website frontpage
They're a bit larger; do they fit well on the front page (does the CSS handle it?)? |
There is a screenshot of the frontpage at the top of the description of the comment that shows the current rendering. |
The images are fixed to 162x139 in the css (https://github.com/matplotlib/matplotlib/blob/master/doc/_static/mpl.css#L759). We should render them an the same size (to save band width and scaling on the client side). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
render / crop images at 162px by 138px
Feature request: be able to specify px by px size of the images we save ! |
I've committed smaller files. I had expected mpl to save at 72 dpi, and it seems to save at 100px so the images are slightly bigger. @tacaswell is that fine or should I make them smaller again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot to submit this review; they're rather minor comments though.
from matplotlib import mlab, cm | ||
|
||
# Default delta is large because that makes it fast, and it illustrates | ||
# the correct registration between image and contours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an image?
|
||
|
||
datafile = cbook.get_sample_data('membrane.dat', asfileobj=False) | ||
x = np.fromstring(open(datafile, 'rb').read(), np.float32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np.fromfile(datafile, np.float32)
Sorry, something went wrong.
All reactions
@QuLogic Fixed. These "new" examples were done by copy pasting stuff, hence the cryptic comments. |
All reactions
Sorry, something went wrong.
The new default in 100dpi! |
All reactions
Sorry, something went wrong.
and I still would rather they be the correct size. |
All reactions
Sorry, something went wrong.
I've fixed the size. |
All reactions
Sorry, something went wrong.
Successfully merging this pull request may close these issues.
I did not find any code to rebuild the frontpage static images. Here is some code more or less reproducing the front page images, with the new defaults.
Here is the frontpage new look:
The images are:
If those are fine, i'll commit them to update the website.
I believe long term we could select a few images generated from our gallery, and add them to the frontpage. They will then always be regenerated if the design changes. (We do this for sklearn's frontpage images, and it works nicely).
ref #5654