Skip to content
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

Example: Economist graphic #25

Open
erikryb opened this issue Nov 22, 2016 · 4 comments
Open

Example: Economist graphic #25

erikryb opened this issue Nov 22, 2016 · 4 comments

Comments

@erikryb
Copy link

erikryb commented Nov 22, 2016

It would be a nice and fun challenge to try to reproduce this graphic from the Economist:

This tutorial does it with ggplot2.

I will try to do this when I have time. I will update on this issue when I get progress.

@cchalmers
Copy link
Owner

Thanks for the suggestion. Here's my attempt: http://lpaste.net/491253858190753792 . It's highlighted a few shortcoming/bugs. I'll try to at least fix the bugs over the next few days. It's still missing the labels and the trend line, those are a bit more difficult.

economist

@erikryb
Copy link
Author

erikryb commented Nov 23, 2016

Impressive looking first attempt! I did some tweaks to it: http://sprunge.us/SDUb?hs. I tried to use linebreaks in the lables, but it appeared as rectangle symbols. Is this a bug?
output

@erikryb
Copy link
Author

erikryb commented Nov 23, 2016

Added trend line. The line is not exactly identical with the original, but it matches the ggplot2 one.

output Code

@cchalmers
Copy link
Owner

cchalmers commented Nov 24, 2016

Nice, it's getting there. I've pushed the axis line style bug. I guess Rasterific doesn't support adding newlines in text like that (the text just gets sent directly to the backend). I've come up with something messy in the pgf backend, although the vertical alignment is wrong. http://lpaste.net/2772832299341840384

economist

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

No branches or pull requests

2 participants