1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
`````python
from pylab import *
x = linspace(0, 2*pi, 1000)
`````
```python
p = plot(x, sin(x))
```
```{python, caption="Sinc function", echo=False}
p = plot(x, sinc(x))
```
```{python, name = "sinc", caption="Sinc function"}
p = plot(x, sinc(x))
```
```{python, name = "sinc", caption="Sinc function", width="50%"}
p = plot(x, sinc(x))
```
```{python, caption="Sinc function", width = "50%"}
p = plot(x, sinc(x))
```
```{python, caption="Sinc function", width = "50%", f_env = "sidefigure"}
p = plot(x, sinc(x))
```
```{python, caption="Sinc function", width = "50%", f_env = "sidefigure"}
for i in range(5):
figure()
p = plot(x, sinc(x*i))
```
```{python}
for i in range(5):
figure()
p = plot(x, sinc(x*i))
```
```{python, results = "verbatim"}
print("Verbatim output")
```
```{python, results = "hidden"}
print("Hidden results!")
```
```
```{python, results = "verbatim", echo = False}
print("No echo!")
```
```{python, results = "tex", echo = False}
print("No echo!")
```
```{python term=True}
for i in range(10):
print(i)
```
```{.python, wrap = True}
print("pweave " * 20)
```
```{.python, wrap = False}
print("pweave " * 20)
```
```{.python, wrap = "code"}
print("pweave " * 20)
```
```{.python, wrap = "results"}
print("pweave " * 20)
```
|