Matplotlib has several backends, some of which work better than
others. The use() function changes the backend.

I would also recommend installing matplotlib via Anaconda. That will
come with all the things you need to show plots.

Aaron Meurer

On Mon, Feb 10, 2020 at 11:19 AM David Bailey <d...@dbailey.co.uk> wrote:
>
> On 08/02/2020 12:21, Oscar Benjamin wrote:
>
> The sympy plotting module is mostly a wrapper around matplotlib. You
> can use matplotlib directly for a lot of the things you suggest.
>
> I think it would be better if sympy's plotting module didn't try to
> wrap up other libraries as "backends" but instead focussed on
> documenting how it should be used in combination with the underlying
> plotting libraries.
>
> Hi everyone,
>
> I have followed the advice to use matplotlib from several members of the 
> group. It certainly looks like the right way to proceed, but I can't get even 
> the simplest Matplotlib program to actually produce a plot.
>
> import matplotlib
> import matplotlib.pyplot as plt
> import numpy as np
>
> # Data for plotting
> t = np.arange(0.0, 2.0, 0.01)
> s = 1 + np.sin(2 * np.pi * t)
>
> fig, ax = plt.subplots()
> ax.plot(t, s)
>
> ax.set(xlabel='time (s)', ylabel='voltage (mV)',
>        title='About as simple as it gets, folks')
> ax.grid()
>
> fig.savefig("test.png")
> plt.show()
>
> It reports: ModuleNotFoundError: No module named 'tkinter'
>
> However when I try to install that module, I get:
>
>  ERROR: Could not find a version that satisfies the requirement tkinter (from 
> versions: none)
> ERROR: No matching distribution found for tkinter
>
> This is the same python instalation that is running Sympy plots successfully, 
> though only after I followed the advice of someone here to use
>
> matplotlib.use("Qt5Agg")
>
> I am running SymPy 1.5 and Python 3.7 under 64-bit Windows 10.
>
> Thanks,
>
> David
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/8f2d8d4f-ddb5-500b-7df4-1cdfaf42e3d0%40dbailey.co.uk.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6Lsq%2BfuWHckXtVeKtVn8wuTkMQZoYotemwQZnHV5G0UYQ%40mail.gmail.com.

Reply via email to