We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this line at the beginning of your matplotlib program may avoid issues if it runs in the console:
import matplotlib_inline; matplotlib_inline.backend_inline.set_matplotlib_formats('png', 'jpeg');
it's really a no brainer solution:
default run, with inline images, doesn't fail running it in external console produces the Qt drawing
full example:
import matplotlib_inline; matplotlib_inline.backend_inline.set_matplotlib_formats('png', 'jpeg'); import matplotlib.pyplot as plt import numpy as np t = np.linspace(-10, 10, 100) sig = 1 / (1 + np.exp(-t)) fig, ax = plt.subplots() ax.axhline(y=0, color="black", linestyle="--") ax.axhline(y=0.5, color="black", linestyle=":") ax.axhline(y=1.0, color="black", linestyle="--") ax.axvline(color="grey") ax.axline((0, 0.5), slope=0.25, color="black", linestyle=(0, (5, 5))) ax.plot(t, sig, linewidth=2, label=r"$\sigma(t) = \frac{1}{1 + e^{-t}}$") ax.set(xlim=(-10, 10), xlabel="t") ax.legend(fontsize=14) plt.show()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
this line at the beginning of your matplotlib program may avoid issues if it runs in the console:
it's really a no brainer solution:
default run, with inline images, doesn't fail
running it in external console produces the Qt drawing
full example:
The text was updated successfully, but these errors were encountered: