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

[add_feature] export figures #36

Closed
42 of 46 tasks
shlff opened this issue Apr 26, 2022 · 12 comments · Fixed by #39
Closed
42 of 46 tasks

[add_feature] export figures #36

shlff opened this issue Apr 26, 2022 · 12 comments · Fixed by #39
Assignees

Comments

@shlff
Copy link
Member

shlff commented Apr 26, 2022

Related code:

export_figures = False

and

if export_figures == True:
	plt.savefig("figures/xx.pdf")

where xx is the figure’s name.

export_figures name lists for each chapter:

ch_intro

  • crude_oil_2019.pdf
  • commercial_aircraft_2019_1.pdf
  • simplex_1.pdf
  • heavy_tailed_draws.pdf
  • ccdf_comparison_1.pdf
  • empirical_powerlaw_plots_firms_forbes.pdf
  • zeta_1.pdf
  • networkx_basics_1.pdf
  • financial_network_analysis_visualization.pdf
  • financial_network_analysis_centrality.pdf
  • commercial_aircraft_2019_2.pdf
  • rand_graph_experiments_1.pdf
  • rand_graph_experiments_2.pdf

ch_production

  • input_output_analysis_15.pdf
  • input_output_analysis_71.pdf
  • input_output_analysis_15_leo.pdf
  • input_output_analysis_15_shocks.pdf
  • input_output_analysis_15_ec.pdf
  • input_output_analysis_aus_114.pdf
  • input_output_analysis_15_omult.pdf
  • input_output_analysis_15_fwd.pdf
  • input_output_analysis_15_up.pdf
  • gdp_growth.pdf
  • input_output_analysis_15_katz.pdf

ch_opt

  • shortest_path_iter_1.pdf
  • betweenness_centrality_1.pdf
  • linear_programming_1.pdf
  • ot_figs_1.pdf
  • ot_large_scale_1.pdf

ch_mcs

  • markov_matrix_visualization.pdf
  • benhabib_mobility_mixing.pdf
  • quah_gdppc_prediction.pdf
  • simplex_2.pdf
  • simplex_3.pdf
  • benhabib_mobility_dists.pdf
  • benhabib_ergodicity_1.pdf

ch_fpms

  • fin_network_sims_1.pdf

appendix

  • func_types_1.pdf
  • func_types_2.pdf
  • three_fixed_points.pdf
  • complex_number.pdf
  • euclidean_convergence_1.pdf
  • span1.pdf
  • func_types_3.pdf
  • polyhedron1.pdf
  • saddle_1.pdf
@shlff shlff self-assigned this Apr 26, 2022
@shlff
Copy link
Member Author

shlff commented Apr 26, 2022

Hi @jstac the figure saddle_1.pdf in the current online website has been separated into 4 plots.

PR #39 combines these 4 figures together again, the same as the figure used in the textbook.

@shlff
Copy link
Member Author

shlff commented Apr 29, 2022

Hi @mmcky , @jstac and I decide to generate the figures used in the network textbook directly from this repo.

To make the figures aligned with our original ones, we need lines 6-13 in a file called initialize.py to control the figure styles.

Do you think we should

Or other options?

Looking forward to your advice.

@jstac
Copy link
Collaborator

jstac commented Apr 29, 2022

@mmcky , we would appreciate your advice here. The lines to be added require a latex installation. Will this be a problem for the GH build?

@mmcky
Copy link
Contributor

mmcky commented Apr 29, 2022

@shlff if you want that configuration to matplotlib to exist for all users then it is probably best to go into https://github.com/QuantEcon/quantecon-book-networks

You could:

  1. add it in __init__.py, or
  2. add it as a function that you call to setup matplotlib when the package is imported such as quantecon_book_networks.configure("matplotlib")

Option 2 is probably best as your not changing matplotlib configuration by default when importing that package.

@mmcky
Copy link
Contributor

mmcky commented Apr 29, 2022

@jstac the lines are matplotlib configurations right?

@mmcky
Copy link
Contributor

mmcky commented Apr 29, 2022

@jstac to answer your question adding latex is no problem. We build pdf now for the live sites via GitHub actions etc.

@jstac
Copy link
Collaborator

jstac commented Apr 29, 2022

OK, thanks @mmcky . @shlff , let's remember to check that the figures look OK after this PR is merged.

@shlff
Copy link
Member Author

shlff commented Apr 29, 2022

Thanks for your great suggestion and comment @mmcky and @jstac .

Sure @jstac I will set up the environment using environment.yml and compile the files on my local machine before you review the PR.

@Fdu-lijiachen
Copy link

Question from 'Chapter 2 - Production -Backward linkages for 15 US sectors in 2019 '
Is hub-based eigenvector with centrality backward linkage coefficient matrix right?
backward linkage may view the sight from supply side, like i is supplier of j, so I think may be use authority-based is better?

@jstac
Copy link
Collaborator

jstac commented May 1, 2022

Thanks for your comment @Fdu-lijiachen . Are you referring to the color scheme of that figure?

@Fdu-lijiachen
Copy link

Thanks for your comment @Fdu-lijiachen . Are you referring to the color scheme of that figure?

Sorry,I mean this is a question I raised about Chapter 2, but I think I put it in the wrong place. I wonder if there is a place to discuss it with you?

@jstac
Copy link
Collaborator

jstac commented May 3, 2022

Hi @Fdu-lijiachen

If you click on the green button near the top that says "new issue", you can open a new issue to describe the problem. That is our standard procedure. Otherwise, if you prefer, you can reach me by email via john.stachurski@anu.edu.au.

Your comments will be appreciated. It's very helpful to us if you can carefully describe the issue.

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

Successfully merging a pull request may close this issue.

4 participants