Skip to content

More uniformity in figure sizes #10

Closed

Description

@jstac

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.

Activity

  1. self-assigned this
    on Feb 20, 2020
  2. shlff commented on Feb 20, 2020

    @shlff
    Member

    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 .

  3. AakashGfude commented on Feb 22, 2020

    @AakashGfude
    Member

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

  4. Harveyt47 commented on Feb 28, 2020

    @Harveyt47
    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
    
  5. shlff commented on Feb 29, 2020

    @shlff
    Member

    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.

  6. mmcky commented on Nov 17, 2022

    @mmcky
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions