The TextBackend supports only expressions over a 1D range: Implicit plotting in Sympy
Asked Answered
A

1

8

On doing the following,

from sympy import *
x, y = symbols('x y')
p1 = plot_implicit((Eq(x**2 + y**2, 5)))

I get the following traceback:

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    p1 = plot_implicit((Eq(x**2 + y**2, 5)))
  File "/home/tinkidinki/.local/lib/python3.6/site-packages/sympy/plotting/plot_implicit.py", line 377, in plot_implicit
    p.show()
  File "/home/tinkidinki/.local/lib/python3.6/site-packages/sympy/plotting/plot.py", line 187, in show
    self._backend.show()
  File "/home/tinkidinki/.local/lib/python3.6/site-packages/sympy/plotting/plot.py", line 1101, in show
    'The TextBackend supports only expressions over a 1D range')
ValueError: The TextBackend supports only expressions over a 1D range

It doesn't seem to get affected by making it a one-variable expression. How do you plot implicitly in Sympy?

Antiperistalsis answered 9/10, 2019 at 15:48 Comment(0)
N
15

If you install matplotlib it will use that for plotting instead of TextBackend. I ran pip install matplotlib and when I tried your expression/command it worked.

Neuralgia answered 9/10, 2019 at 16:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.