> https://www.hebergementwebs.com/tutorial-de-sympy/sympy-guia-rapida

## Sympy con graficas


```python
import matplotlib
```


```python
from sympy.plotting import plot
```


```python
from sympy import *
```


```python
x = Symbol ( 'x')
```


```python
x
```




$\displaystyle x$




```python
plot (x ** 2, line_color = 'fuchsia')
```


```python
plot (x ** 2, line_color = '#e30052')
```


```python
plot (x ** 2)
```


```python
plot (sin (x), cos (x), (x, -pi, pi))
```


```python
plot ((sin (x), (x, -2 * pi, 2 * pi)), (cos (x), (x , -pi, pi)))
```


```python
plot ((sin (x), (x, -2 * pi, 2 * pi)), (cos (x), (x, - pi, pi) ), line_color = 'green', title = 'Ejemplo grafico con SymPy en DIGITALEXA')
```


```python
##https://www.cfm.brown.edu/people/dobrush/am33/SymPy/part1.html
```

## Graficas en 3D

> La funcion **plot3d ()** genera un grafico tridimensional. **plot3d (expr, xrange, yrange, kwarg s)** 


```python
from sympy.plotting import plot3d
```


```python
from sympy import *
```


```python
x = Symbol('x')
```


```python
y = Symbol('y')
```


```python
x, y 
```




    (x, y)




```python
x
```




$\displaystyle x$




```python
y
```




$\displaystyle y$



### El siguiente ejemplo dibuja un grafico de superficie 3D


```python
plot3d (x * y, (x, -10,10), (y, -10,10))
```


```python
plot3d (x * y, x / y, (x, -5, 5), (y, -5, 5))
```


```python
plot3d(x*y, -x*y, (x, -5, 5), (y, -5, 5))
```


```python
 plot3d((x**2 + y**2, (x, -5, 5), (y, -5, 5)),
...     (x*y, (x, -3, 3), (y, -3, 3)))
```

> La funcion **plot3d_parametric_line ()** representa un grafico lineal parametrico en **3 dimensiones.**


```python
from sympy.plotting import plot3d_parametric_line
```


```python
plot3d_parametric_line (cos (x), sin (x), x, (x, -5, 5))
```

 ### Para dibujar una grafica de superficie parametrica, use la funcion plot3d_parametric_surface ().

> plot3d_parametric_surface (xexpr, yexpr, zexpr, rangex, rangey, kwargs)


```python
##https://www.cfm.brown.edu/people/dobrush/am33/SymPy/part1.html
```


```python
from sympy import symbols, cos, sin
from sympy.plotting import plot3d_parametric_surface
u, v = symbols('u v')
```


```python
plot3d_parametric_surface(cos(u + v), sin(u - v), u - v,(u, -5, 5), (v, -5, 5))
```


```python
u, v
```




    (u, v)




```python
u
```




$\displaystyle u$




```python
v
```




$\displaystyle v$




```python
from sympy import plot_implicit, cos, sin, symbols, Eq, And
x, y = symbols('x y')
```


```python
# Using mesh grid with number of points as input.
```


```python
p5 = plot_implicit(Eq(x**2 + y**2, 5),
...         (x, -5, 5), (y, -2, 2),
...         adaptive=False, points=400)
```


```python
# Plotting regions.
```


```python
p6 = plot_implicit(y > x**2)
```


```python
# Plotting Using boolean conjunctions.
```


```python
p7 = plot_implicit(And(y > x, y > -x))
```


```python

```

4e0716549c5261c8d5b95ec40da1190350dcd3e5
ipynb
Jupyter Notebook
Parte2-Ariel-SymPy-01-Graficas.ipynb
asnramos/pycon_ar
767e58b001811383b18c469cfa5d6426367bc862
MIT
2021-10-31T13:13:14.000Z
2021-12-20T07:27:34.000Z
Parte2-Ariel-SymPy-01-Graficas.ipynb
asnramos/pycon_ar
767e58b001811383b18c469cfa5d6426367bc862
MIT
Parte2-Ariel-SymPy-01-Graficas.ipynb
asnramos/pycon_ar
767e58b001811383b18c469cfa5d6426367bc862
MIT
2022-03-03T19:45:58.000Z
2022-03-03T19:45:58.000Z
Qwen/Qwen-72B
1. YES
2. YES