Skip to content

Fix arrow color #394

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 Mar 11, 2024 · 10 comments · Fixed by #423
Closed

Fix arrow color #394

jstac opened this issue Mar 11, 2024 · 10 comments · Fixed by #423

Comments

@jstac
Copy link
Contributor

jstac commented Mar 11, 2024

Arrows in the graph in https://intro.quantecon.org/markov_chains_II.html#example-4 should be black, not red --- the same as the other figures.

@mmcky
Copy link
Contributor

mmcky commented Apr 16, 2024

@jstac I didn't see any tikz code to generate this figure. Would the following networkx generated figure be ok?

Screenshot 2024-04-16 at 11 26 12 AM

@mmcky
Copy link
Contributor

mmcky commented Apr 16, 2024

@kp992 have you used mermaid before?

https://mermaid.js.org

Wondering if we should give this a go for generating some of these figures. It will be natively available when we move over to mystjs so figures wouldn't need to be tracked as a static asset which would be great and in current jupyterbook we could use

https://github.com/mgaitan/sphinxcontrib-mermaid

  • test compatibility with LaTeX outputs

@jstac
Copy link
Contributor Author

jstac commented Apr 16, 2024

Thanks fine @mmcky -- but mermaid sounds good. Does it support latex?

@mmcky
Copy link
Contributor

mmcky commented Apr 16, 2024

Thanks fine @mmcky -- but mermaid sounds good. Does it support latex?

That's what I want to check.

I have transferred that part of this issue to QuantEcon/meta#140

The PR #420 is ready for review

@kp992
Copy link
Contributor

kp992 commented Apr 16, 2024

https://github.com/QuantEcon/lecture-python-intro/blob/main/lectures/_static/lecture_specific/graphviz/graphviz_generation.ipynb cell number 8 has red color which seems to be the reason for this. Just removing that wouldn't fix the error?

@kp992
Copy link
Contributor

kp992 commented Apr 16, 2024

@kp992 have you used mermaid before?

I haven't used it before, but I can have a look if its useful for us.

@kp992
Copy link
Contributor

kp992 commented Apr 16, 2024

Using the below mermaid code:

graph LR;
    A((A)) -- 0.1 --> B((B))
    B -- 0.2 --> A

I was able to generate the following:
Screenshot 2024-04-16 at 6 29 39 PM

Moreover, https://sphinxcontrib-mermaid-demo.readthedocs.io/en/latest/#markdown-support also supports mermaid so we can give it a try on one of the lectures and see if this looks good.

@jstac
Copy link
Contributor Author

jstac commented Apr 16, 2024

https://github.com/QuantEcon/lecture-python-intro/blob/main/lectures/_static/lecture_specific/graphviz/graphviz_generation.ipynb cell number 8 has red color which seems to be the reason for this. Just removing that wouldn't fix the error?

Yep :-)

Let's do that.

@mmcky
Copy link
Contributor

mmcky commented Apr 17, 2024

Thanks @kp992 -- do you know if there is a reason these are in a folder called graphviz?
I think we should split this ipynb up into figures.ipynb in each of the lecture folders to avoid this type of mistake.

@kp992
Copy link
Contributor

kp992 commented Apr 17, 2024

do you know if there is a reason these are in a folder called graphviz?

I am not aware when this was added, but yeah, I agree that lecture-specific figures should be in their respective folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants