Skip to content

Rewrite the barcode example #17922

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 1 commit into from
Jul 17, 2020
Merged

Rewrite the barcode example #17922

merged 1 commit into from
Jul 17, 2020

Conversation

timhoffm
Copy link
Member

PR Summary

This example is a bit particular anyway, but let's make it practical by
generating a real bar code and not only some random lines.

Fun fact: The used code is the GTIN-13 for "The Visual Display of
Quantitative Information", Edward R. Tufte.

@jklymak
Copy link
Member

jklymak commented Jul 14, 2020

I'd say that in the example? Or do you want it to be an easter egg?

@timhoffm
Copy link
Member Author

It doesn't really add to the example. So, I'd leave it as an easter egg. But no strong preference.

@timhoffm timhoffm added this to the v3.4.0 milestone Jul 14, 2020
This is a bit particular anyway, but let's make it practical by
generating a real bar code and not only some random lines.

Fun fact: The used code is the GTIN-13 for "The Visual Display of
Quantitative Information", Edward R. Tufte.
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.

Fine, though not sure about the DPI

ax2.set_axis_off()
ax2.imshow(x.reshape((1, -1)), **barprops)
pixel_per_bar = 4
dpi = 100
Copy link
Member

Choose a reason for hiding this comment

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

So not sure this matters, but we save at 200 dpi now, don't we?

Copy link
Member Author

Choose a reason for hiding this comment

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

Um, I don't think so. When did that happen?

We now oversample the thumbnails in the gallery (#17734). But that does not affect the images in the examples themselves. Maybe you are mixig this up?

@QuLogic
Copy link
Member

QuLogic commented Jul 17, 2020

I don't think there's any 200 dpi yet, so merging.

@QuLogic QuLogic merged commit 38c41ae into matplotlib:master Jul 17, 2020
@timhoffm timhoffm deleted the doc-barcode branch July 17, 2020 06:41
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.

3 participants