Update python.md

This commit is contained in:
Alex Goodman 2016-08-12 21:42:48 -07:00 committed by GitHub
parent 1efa0c975e
commit 2e9ce4c3da

View file

@ -87,7 +87,7 @@ print("".join(z.checkbox("f3", [("o1","1"), ("o2","2")],["1"])))
## Matplotlib integration
The python interpreter can display matplotlib graph with the function `z.show()`.
You need to have matplotlib module installed and a XServer running to use this functionality !
You need to have matplotlib module installed and a XServer running to use this functionality!
```python
%python
@ -97,12 +97,12 @@ plt.figure()
z.show(plt)
plt.close()
```
z.show function can take optional parameters to adapt graph width and height
The `z.show()` function can take optional parameters to adapt graph dimensions (width and height) as well as output format (png or optionally svg).
```python
%python
z.show(plt, width='50px')
z.show(plt, height='150px')
z.show(plt, height='150px', fmt='svg')
```
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/pythonMatplotlib.png" />