Skip to content

More uniformity in figure sizes #10

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

Closed
jstac opened this issue Nov 25, 2019 · 5 comments
Closed

More uniformity in figure sizes #10

jstac opened this issue Nov 25, 2019 · 5 comments
Assignees

Comments

@jstac
Copy link
Contributor

jstac commented Nov 25, 2019

Right now figure sizes are all over the shop, without any common rule.

I suggest that, for any standard figure, we remove the figsize=(x,y) argument and use the default size instead.

Then we can figure out the best way to set the default size.

For nonstandard figures, such as those with multiple subplots, we should treat them individually, just by looking at them, but with the default size as a reference point.

Note that attention needs to be paid to the PDF as well as the web version.

If you are tackling this as an RA, please discuss with @mmcky. He will have ideas on how we can control the default figure size globally.

@shlff shlff self-assigned this Feb 20, 2020
@shlff
Copy link
Member

shlff commented Feb 20, 2020

Good morning, @jstac . Given your advice on setting the default size, I discuss it with @AakashGfude and Chase. We figured out there are two different ways to set default figure size globally:

  1. The first is to set the default figure size in our jupinx builder. With this way, we can set the default figure size for all standard figures across all lectures.
  2. The second way is to set the default figure size by using a function rc('figure', figsize=(x, y)) from the library matplotlib in the front import section of every lecture. With this way, we can only set the default figure size for one lecture, but it is more flexible. (See an example lecture with this setting, here) We can experiment it to find an appropriate figure size for all standard figures.

Which method do you prefer?

PS. If you prefer the first method, then we would like to discuss it more with @mmcky .

@AakashGfude
Copy link
Member

@shlff @mmcky @jstac , one natural and easy place to set the default image size is in HTML and latex templates.

@Harveyt47
Copy link
Member

@shlff @jstac @AakashGfude

Here is the code which can globally change the figsize and the font size for plots at the start of each lecture

import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
plt.rcParams['figure.figsize'] = [8.0, 6.0]
plt.rcParams['font.size'] = 12

@shlff
Copy link
Member

shlff commented Feb 29, 2020

Thanks for your good proposal, @Harveyt47 .

Yours is related to method 2 I mentioned above. Now, after a discussion about pro and con, we decide to implement method 1.

@Harveyt47 Harveyt47 transferred this issue from QuantEcon/lecture-source-py Apr 23, 2020
@mmcky mmcky transferred this issue from QuantEcon/lecture-python-website Jun 1, 2020
@mmcky
Copy link

mmcky commented Nov 17, 2022

I think this can be closed as implemented across many pages. We also have the following in the manual

https://manual.quantecon.org/writing/styleguide.html#figure-sizes

@mmcky mmcky closed this as completed Nov 17, 2022
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

5 participants