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

closing pyplot before draw #32

Merged
merged 1 commit into from
Aug 4, 2024
Merged

closing pyplot before draw #32

merged 1 commit into from
Aug 4, 2024

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented Aug 4, 2024

This should fix the overlaid graphs

@mmatera mmatera changed the title closing pyplot before dray closing pyplot before draw Aug 4, 2024
@rocky
Copy link
Member

rocky commented Aug 4, 2024

For me this has no effect in Django - broken either way. I suspect a change needs to be done in Django.

@mmatera
Copy link
Contributor Author

mmatera commented Aug 4, 2024

OK, with this setup:


Software Information
Python

Python: 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0]
Implementation: CPython 3.11.3.final.0

Mathics3 Software

Mathics3 Django: 7.0.0dev0
Mathics3: 7.0.0dev0

Web Software

Django: 5.0.7
mathics-threejs-backend: 1.3.1
three.js: 146
MathJax: 2.7.9

Numeric Software

mpmath: 1.3.0
Numpy: 1.24.3
Sympy: 1.12

Optional Software

cython: 0.29.34
lxml: 4.9.2
networkx: 3.3
nltk: Not installed
psutil: 5.9.5
skimage: 0.20.0
scipy: 1.14.0
wordcloud: 1.9.2

matplotlib: 3.7.1 -> Something to add to mathics_info


there is no superposition with previous graphs.

To continue the research, what is the output of the following command when is run in the terminal?

mathics -e 'LoadModule["pymathics.graph"];' -e 'Graph[{1<->2,3<->4},VertexLabels->True]//TeXForm' -e 'Graph[{2<->3,3<->4},VertexLabels->True]//TeXForm'

Also, how does the generated figures look?

@rocky
Copy link
Member

rocky commented Aug 4, 2024

LGTM - this addresses the problem seen in mathics-core PDF generation with 3.9.1.

However for Django, see Mathics3/mathics-django#206

@rocky rocky merged commit b7cec36 into master Aug 4, 2024
3 checks passed
@rocky rocky deleted the fix_ovelaid_graphs branch August 4, 2024 13:29
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 this pull request may close these issues.

2 participants