Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-2511

Matplotlib angular backend doesn't update a plot for %python interpreter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Feedback Received
    • 0.7.1
    • None
    • zeppelin-interpreter
    • None
    • Python 3.6 and Matplotlib from Anaconda
      Ubuntu 16.04

    Description

      I'm trying to run the following code in Zeppelin using %python interpreter:

      First cell:

      %python
      
      import numpy as np
      import matplotlib.pyplot as plt
      
      plt.close()
      z.configure_mpl(close=False, angular=True)
      
      x = np.linspace(0, 50, 100)
      plt.plot(x, np.sin(x))
      

      Second cell:

      %python
      plt.plot(x, x)
      

      However the second cell just outputs a string

      [<matplotlib.lines.Line2D object at 0x7fd225dee2e8>]

      and doesn't update the plot.

      I followed ZEPPELIN-1345 and the PR https://github.com/apache/zeppelin/pull/1534, and one of the comments there confirms that it should work in a %python interpreter as well as in a %pyspark one.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              a-rodin Alexander Rodin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: