mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Python: update docs to reffer new API
This commit is contained in:
parent
ee6668b4c1
commit
3b1ad367e9
2 changed files with 5 additions and 5 deletions
|
|
@ -67,7 +67,7 @@ print("".join(z.checkbox("f3", [("o1","1"), ("o2","2")],["1"])))
|
|||
* Code-completion is currently not implemented.
|
||||
|
||||
## Matplotlib integration
|
||||
The python interpreter can display matplotlib graph with the function `zeppelin_show()`.
|
||||
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 !
|
||||
|
||||
```python
|
||||
|
|
@ -75,15 +75,15 @@ print("".join(z.checkbox("f3", [("o1","1"), ("o2","2")],["1"])))
|
|||
import matplotlib.pyplot as plt
|
||||
plt.figure()
|
||||
(.. ..)
|
||||
zeppelin_show(plt)
|
||||
z.show(plt)
|
||||
plt.close()
|
||||
```
|
||||
zeppelin_show function can take optional parameters to adapt graph width and height
|
||||
|
||||
```python
|
||||
%python
|
||||
zeppelin_show(plt, width='50px')
|
||||
zeppelin_show(plt, height='150px')
|
||||
z.show(plt, width='50px')
|
||||
z.show(plt, height='150px')
|
||||
```
|
||||
|
||||
[](/docs/interpreter/screenshots/pythonMatplotlib.png)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ z.show(plt,height='150px') </pre></div>''')
|
|||
<div>The interpreter can visualize Pandas DataFrame
|
||||
with the function z.show()
|
||||
<pre>
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
df = pd.read_csv("bank.csv", sep=";")
|
||||
z.show(df)
|
||||
</pre></div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue