mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Move mpl backend files to /interpreter
This commit is contained in:
parent
24f89c63a8
commit
9ef6ff718a
9 changed files with 9 additions and 8 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -7,7 +7,8 @@
|
|||
*.ear
|
||||
|
||||
# interpreter
|
||||
/interpreter/
|
||||
/interpreter/*
|
||||
!/interpreter/lib
|
||||
|
||||
# interpreter temp files
|
||||
spark/derby.log
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ plt.plot([1, 2, 3])
|
|||
|
||||
Will produce a 400x300 image in SVG format, which by default are normally 600x400 and PNG respectively. In the future, another option called `angular` can be used to make it possible to update a plot produced from one paragraph directly from another (the output will be `%angular` instead of `%html`). However, this feature is already available in the `pyspark` interpreter. More details can be found in the included "Zeppelin Tutorial: Python - matplotlib basic" tutorial notebook.
|
||||
|
||||
If Zeppelin cannot find the matplotlib backend files (which should usually be found in `$ZEPPELIN_HOME/lib/python`) in your `PYTHONPATH`, then the backend will automatically be set to agg, and the (otherwise deprecated) instructions below can be used for more limited inline plotting.
|
||||
If Zeppelin cannot find the matplotlib backend files (which should usually be found in `$ZEPPELIN_HOME/interpreter/lib/python`) in your `PYTHONPATH`, then the backend will automatically be set to agg, and the (otherwise deprecated) instructions below can be used for more limited inline plotting.
|
||||
|
||||
If you are unable to load the inline backend, use `z.show(plt)`:
|
||||
```python
|
||||
|
|
|
|||
3
pom.xml
3
pom.xml
|
|
@ -460,6 +460,9 @@
|
|||
<fileset>
|
||||
<directory>interpreter</directory>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
<excludes>
|
||||
<exclude>lib/**</exclude>
|
||||
</excludes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class PyZeppelinContext(object):
|
|||
pass
|
||||
# Make sure custom backends are available in the PYTHONPATH
|
||||
rootdir = os.environ.get('ZEPPELIN_HOME', os.getcwd())
|
||||
mpl_path = os.path.join(rootdir, 'lib', 'python')
|
||||
mpl_path = os.path.join(rootdir, 'interpreter', 'lib', 'python')
|
||||
if mpl_path not in sys.path:
|
||||
sys.path.append(mpl_path)
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import org.junit.Test;
|
|||
* <ol>
|
||||
*
|
||||
* Your PYTHONPATH should also contain the directory of the Matplotlib
|
||||
* backend files. Usually these can be found in $ZEPPELIN_HOME/lib/python.
|
||||
* backend files. Usually these can be found in $ZEPPELIN_HOME/interpreter/lib/python.
|
||||
*
|
||||
* To run manually on such environment, use:
|
||||
* <code>
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class PyZeppelinContext(dict):
|
|||
|
||||
# Make sure custom backends are available in the PYTHONPATH
|
||||
rootdir = os.environ.get('ZEPPELIN_HOME', os.getcwd())
|
||||
mpl_path = os.path.join(rootdir, 'lib', 'python')
|
||||
mpl_path = os.path.join(rootdir, 'interpreter', 'lib', 'python')
|
||||
if mpl_path not in sys.path:
|
||||
sys.path.append(mpl_path)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,9 +62,6 @@
|
|||
<directoryMode>0755</directoryMode>
|
||||
<fileMode>0755</fileMode>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../lib</directory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../licenses</directory>
|
||||
</fileSet>
|
||||
|
|
|
|||
Loading…
Reference in a new issue