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

Latest Matplotlib with GR as a backend? #23

Open
lsolanka opened this issue Dec 4, 2020 · 1 comment
Open

Latest Matplotlib with GR as a backend? #23

lsolanka opened this issue Dec 4, 2020 · 1 comment

Comments

@lsolanka
Copy link

lsolanka commented Dec 4, 2020

Hello there,

I'm trying the matplotlib backend example with the latest matplotlib (3.3.3): https://gr-framework.org/tutorials/matplotlib.html

I'm taking this code:

import numpy as np
import matplotlib.pyplot as plt
t = np.arange(0.0, 2.0, 0.01)
s = np.sin(2*np.pi*t)

plt.plot(t,s)
plt.title(r'$\alpha_i > \beta_i$', fontsize=20)
plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
         fontsize=20)
plt.xlabel('time (s)')
plt.ylabel('volts (mV)')
plt.show()

Then setting the backend through the environment variable: export MPLBACKEND="module://gr.matplotlib.backend_gr", and running the example script, simply does not produce any window.

Anything I'm missing here?

@jheinen
Copy link
Contributor

jheinen commented Dec 6, 2020

I cannot reproduce this problem:

export MPLBACKEND="module://gr.matplotlib.backend_gr"
python3 -i your-example-script.py

Screen Shot 2020-12-06 at 12 44 14

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

No branches or pull requests

2 participants