Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

some matplotlib figures not showing up #7

Closed
fkazemian opened this issue Aug 28, 2018 · 58 comments
Closed

some matplotlib figures not showing up #7

fkazemian opened this issue Aug 28, 2018 · 58 comments
Assignees
Labels

Comments

@fkazemian
Copy link
Contributor

4

@fkazemian
Copy link
Contributor Author

ai
aiyagari.html

@mmcky
Copy link
Collaborator

mmcky commented Aug 30, 2018

thanks @fkazemian I think this is an issue with the code which is not showing the matplotlib figure in the compiled notebook. It may need the matplotlib cell magics. @natashawatkins when you removed the output from the files (such as aiyagari) did you run the resultant notebook to check if images show up in the notebook?

@natashawatkins
Copy link
Member

Yes.

This is a bug with either matplotlib or the jupyter notebook - if you re-run the cell, the image will show up. For some reason it seems that matplotlib needs to be initialised once before it displays images inline.

@natashawatkins
Copy link
Member

Ah I see this is in the generated notebook... um yes ok this seems to be a recent bug with Jupyter notebooks.

Here is a discussion of the issue: holoviz/holoviews#68

Can we change the settings for matplotlib?

@mmcky
Copy link
Collaborator

mmcky commented Aug 31, 2018

@natashawatkins any changes are just required to be in a code-block for it to be contained in the notebook. Are suggesting we update the lecture to have these changes to make showing images more robust?

@natashawatkins
Copy link
Member

No I was wondering whether it would be possible to edit the config file for matplotlib as suggested in the thread. The location should be ~/.matplotlibrc. They suggest changing the default backend could fix the issue.

@fkazemian
Copy link
Contributor Author

In amss.html, it seems codes that creat matplotlib figures, are not running.
screenshot from 2018-09-03 11-08-01

screenshot from 2018-09-03 11-08-58

screenshot from 2018-09-03 11-09-21

@fkazemian
Copy link
Contributor Author

screenshot from 2018-09-03 13-13-15
screenshot from 2018-09-03 13-13-32

amss2.html

@natashawatkins
Copy link
Member

That's weird, maybe it's timing out...

We should definitely remove those print statements, on another note

@mmcky
Copy link
Collaborator

mmcky commented Sep 3, 2018

@fkazemian is this happening locally for you also?

When I built the html via IPYNB for the compare-lectures site -- it might have timed out the execution for this specific lecture. Can you confirm if the amss2 lecture works locally?

@fkazemian
Copy link
Contributor Author

arma:

screenshot from 2018-09-04 12-41-04

screenshot from 2018-09-04 13-25-33

Hi @mmcky I don't have this problem when I'm running it locally:
screenshot from 2018-09-04 16-30-27

@fkazemian
Copy link
Contributor Author

(career)

screenshot from 2018-09-05 10-37-18

but it works fine locally
screenshot from 2018-09-05 10-42-22

@fkazemian
Copy link
Contributor Author

(debugging)
screenshot from 2018-09-05 15-01-38

but it works fine locally:

screenshot from 2018-09-05 15-02-57

@fkazemian
Copy link
Contributor Author

discrete_dp:
screenshot from 2018-09-05 15-22-29

@mmcky
Copy link
Collaborator

mmcky commented Sep 6, 2018

hey @fkazemian when I run arma locally -- the first time I get the text output and the second run I get the figure. That is a bit strange. Do you get the same?

@fkazemian
Copy link
Contributor Author

Hi @mmcky , no actually in the first time run I got the figure, and also I just checked arma locally again and I got the figure in my first run. I am using the computer in the lab ( Number1).

@fkazemian
Copy link
Contributor Author

(estspec)
screenshot from 2018-09-07 11-00-56

screenshot from 2018-09-07 11-02-35

screenshot from 2018-09-07 11-02-47

@fkazemian
Copy link
Contributor Author

(finite_markov)
screenshot from 2018-09-07 11-18-22

@fkazemian
Copy link
Contributor Author

(getting_started)
screenshot from 2018-09-07 12-02-45

@fkazemian
Copy link
Contributor Author

(hist_dep_policies)
screenshot from 2018-09-07 13-27-22

@fkazemian
Copy link
Contributor Author

(ifp)
screenshot from 2018-09-07 13-53-34

@fkazemian
Copy link
Contributor Author

(jv)
screenshot from 2018-09-07 14-50-06

screenshot from 2018-09-07 14-49-28

@fkazemian
Copy link
Contributor Author

(kalman)
screenshot from 2018-09-07 14-53-56

@fkazemian
Copy link
Contributor Author

(lake_model)
screenshot from 2018-09-07 15-04-05
screenshot from 2018-09-07 15-05-21

@fkazemian
Copy link
Contributor Author

(linear_algebra)
screenshot from 2018-09-10 09-56-00

@fkazemian
Copy link
Contributor Author

(lln_clt)
screenshot from 2018-09-10 11-20-33

@fkazemian
Copy link
Contributor Author

(lqcontrol)
screenshot from 2018-09-10 11-51-54

@fkazemian
Copy link
Contributor Author

(lu_tricks)
screenshot from 2018-09-10 16-03-40

@fkazemian
Copy link
Contributor Author

(lucas_model)
screenshot from 2018-09-10 16-09-02

@fkazemian
Copy link
Contributor Author

(markov_asset)
screenshot from 2018-09-10 16-19-08

@fkazemian
Copy link
Contributor Author

mccall_model_with_separation
screenshot from 2018-09-11 10-21-11

@fkazemian
Copy link
Contributor Author

(mle)
screenshot from 2018-09-11 10-24-24

@fkazemian
Copy link
Contributor Author

(numba)
screenshot from 2018-09-11 16-22-44

@fkazemian
Copy link
Contributor Author

odu
screenshot from 2018-09-11 16-38-49

@fkazemian
Copy link
Contributor Author

ols:
screenshot from 2018-09-11 16-43-59

@fkazemian
Copy link
Contributor Author

opt_tax_recur:
screenshot from 2018-09-11 16-57-26

@fkazemian
Copy link
Contributor Author

optgrowth:
screenshot from 2018-09-11 17-10-53

@fkazemian
Copy link
Contributor Author

pandas:
screenshot from 2018-09-12 09-57-24

@fkazemian
Copy link
Contributor Author

perm_income
screenshot from 2018-09-12 10-34-33

@fkazemian
Copy link
Contributor Author

python_by_example
screenshot from 2018-09-12 11-17-25

@fkazemian
Copy link
Contributor Author

python_oop
screenshot from 2018-09-12 11-54-35

@fkazemian
Copy link
Contributor Author

samuelson

screenshot from 2018-09-12 13-16-47

@fkazemian
Copy link
Contributor Author

schelling
screenshot from 2018-09-12 13-32-14

@fkazemian
Copy link
Contributor Author

scipy
screenshot from 2018-09-12 13-47-16

@fkazemian
Copy link
Contributor Author

smoothing
screenshot from 2018-09-12 14-00-31

@fkazemian
Copy link
Contributor Author

stationary_densities
screenshot from 2018-09-12 14-14-29

@fkazemian
Copy link
Contributor Author

wald_friedman

screenshot from 2018-09-12 14-45-43

@fkazemian
Copy link
Contributor Author

writing_good_code
screenshot from 2018-09-12 14-51-18

@mmcky
Copy link
Collaborator

mmcky commented Sep 17, 2018

I have edited the builder to prepend %matplotlib inline prior to executing a notebook to ensure matplotlib is setup correctly. The prepended line is then removed prior to writing the executed notebook to disk.

@mmcky
Copy link
Collaborator

mmcky commented Sep 17, 2018

@fkazemian I have pushed the latest to compare-lectures.quantecon.org. Would you mind checking if this is fixed. There may still be a few missing if execution time takes longer than 1200s.

@fkazemian
Copy link
Contributor Author

Hi @mmcky sure, I'll check all of them

@fkazemian
Copy link
Contributor Author

writing_good_code
screenshot from 2018-09-18 10-22-28
wald_friedman
screenshot from 2018-09-18 10-24-05
stationary_densities
screenshot from 2018-09-18 10-25-07
smoothing
screenshot from 2018-09-18 10-26-04
scipy
screenshot from 2018-09-18 10-27-19
schelling
screenshot from 2018-09-18 10-28-47
samuelson
screenshot from 2018-09-18 10-29-44
python_oop
screenshot from 2018-09-18 10-31-05
python_by_example
screenshot from 2018-09-18 10-32-02
perm_income
screenshot from 2018-09-18 10-33-20

@fkazemian
Copy link
Contributor Author

pandas
screenshot from 2018-09-18 10-34-36

optgrowth
screenshot from 2018-09-18 10-35-34

opt_tax_recur
screenshot from 2018-09-18 10-37-00

ols
screenshot from 2018-09-18 10-37-52

odu
screenshot from 2018-09-18 10-38-44

numba
screenshot from 2018-09-18 10-39-42

mle
screenshot from 2018-09-18 10-40-33

mccall_model_with_separation
screenshot from 2018-09-18 10-41-24

matplotlib
screenshot from 2018-09-18 10-42-18

@fkazemian
Copy link
Contributor Author

Hi @mmcky I checked about 20 of them (as you can see above) and all of them are fixed, so it seems this bug is fixed and I change the label to Fixed, Thanks

@fkazemian fkazemian added Fixed and removed check-fix labels Sep 18, 2018
@mmcky
Copy link
Collaborator

mmcky commented Sep 18, 2018

thanks @fkazemian that's a big help. Good news.

@mmcky mmcky closed this as completed Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants