GitHub user agoodm opened a pull request:
https://github.com/apache/zeppelin/pull/1343
ZEPPELIN-1328 - z.show in python interpreter does not display PNG images in
python 3
### What is this PR for?
Support for plotting PNG images via matplotlib inline for the python
interpreter was recently added (#1329). However, these changes did not work for
python3 since it handles strings differently. This PR aims to make the inline
plotting compatible with both python 2 and 3.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
* [ZEPPELIN-1328](https://issues.apache.org/jira/browse/ZEPPELIN-1328)
### How should this be tested?
In a python interpreteter cell, make sure the following produce an image:
```python
%python
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(5)
plt.plot(x)
z.show(plt, fmt='png') # Repeat for fmt='svg'
```
This should be tested for both python2 and 3 interpreters (via the
interpreter settings page).
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/agoodm/zeppelin ZEPPELIN-1328
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/1343.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1343
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---