GitHub user hafizur-rahman opened a pull request:

    https://github.com/apache/zeppelin/pull/1422

    Allow matplotlib plot display in pyspark context

    ### What is this PR for?
    Similar to %python context, allow matplotlib plot display in %pyspark 
context
    
    ### What type of PR is it?
    Improvement
    
    ### How should this be tested?
    The following code should display a graph:
    
    ```
    %pyspark
    
    import numpy as np
    import matplotlib
    
    matplotlib.use('Agg')
    
    import matplotlib.pyplot as plt
    
    x = np.linspace(0, 1)
    y = np.sin(4 * np.pi * x) * np.exp(-5 * x)
    
    plt.figure()
    
    plt.fill(x, y, 'r')
    plt.grid(True)
    
    z.show(plt, fmt="svg")
    plt.close()
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hafizur-rahman/zeppelin patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1422.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 #1422
    
----
commit 36ea45b277aadc3e06b11c3713af5a19e9e7b32c
Author: Hafizur Rahman <[email protected]>
Date:   2016-09-09T16:51:26Z

    Allow matplotlib plot display in pyspark context

----


---
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.
---

Reply via email to