Hi Moon, Thank you for the informative response. You are right, this is all in fact explicitly stated in the most recent set of matplotlib release notes[1]. This won't really apply to the static inline plotting backend that I will be tackling first which will mostly be pure python, but it will probably be good to keep this in mind when we begin work on the interactive plotting.
[1] - http://matplotlib.org/users/whats_new.html#interactive-oo-usage Thanks, Alex On Thu, Aug 18, 2016 at 11:13 PM, moon soo Lee <[email protected]> wrote: > Hi, > > It's great to see improving matplotlib integration. Thanks a lot. > > In my understanding, in interactive mode, the graph supposed to be updated > even if some matplotlib methods are called in the other paragraph(cell). > That means the result of a paragraph need to be updated by running another > paragraph. > > Currently, i think there're two different facilities in Zeppelin to do > that. > > One possible way is using InterpreterContextRunner [1]. InterpreterContext > provides InterpreterContextRunner[2] and it gives ability to run other > paragraphs in the same note. However this approach does have some > limitations. Like if paragraph (cell) is in the other notebook, interactive > update of graph will not work anymore. And because it's not only update the > result of the other paragraph, but also run the other paragraph, it'll be > difficult to make interactive mode work correctly depends on user code in > each paragraphs. > > Second possible approach is using AngularDisplay system. > Which allows interpreter send/receive some data and event from/to front-end > side. > So without rerun another paragraph, it's possible to update result of a > paragraph from another. > Any interpreter can get AngularObjectRegistry[3] from InterpreterContext > [4], and AngularObjectRegistry allows create object / add event hook to > communicate with front-end. I think this is more feasible approach. > > Thanks, > moon > > [1] > https://github.com/apache/zeppelin/blob/master/zeppelin- > interpreter/src/main/java/org/apache/zeppelin/interpreter/ > InterpreterContextRunner.java > [2] > https://github.com/apache/zeppelin/blob/master/zeppelin- > interpreter/src/main/java/org/apache/zeppelin/interpreter/ > InterpreterContext.java#L123 > [3] > https://github.com/apache/zeppelin/blob/master/zeppelin- > interpreter/src/main/java/org/apache/zeppelin/display/ > AngularObjectRegistry.java > [4] > https://github.com/apache/zeppelin/blob/master/zeppelin- > interpreter/src/main/java/org/apache/zeppelin/interpreter/ > InterpreterContext.java#L115 > > > On Thu, Aug 18, 2016 at 11:57 AM Goodman, Alexander (398K) < > [email protected]> wrote: > > > Hi all, > > > > As per previous discussion I had with Alex Bezzubov on the users mailing > > list, I have created two new JIRA issues ([1] and [2]) explaining in more > > detail what I think we should ultimately strive for in our ongoing work > to > > improve matplotlib integration in zeppelin. For now I think I will be > able > > to handle the bulk of the work for the static images backend issue > > [ZEPPELIN-1345] on my own, but more collaboration will be needed to get > > interactive plotting to work. Please feel free to discuss any thoughts > or > > suggestions you may have here. > > > > [1] - https://issues.apache.org/jira/browse/ZEPPELIN-1344 > > [2] - https://issues.apache.org/jira/browse/ZEPPELIN-1345 > > > > Thanks, > > Alex > > -- > > Alex Goodman > > Data Scientist I > > Science Data Modeling and Computing (398K) > > Jet Propulsion Laboratory > > California Institute of Technology > > Tel: +1-818-354-6012 > > > -- Alex Goodman Data Scientist I Science Data Modeling and Computing (398K) Jet Propulsion Laboratory California Institute of Technology Tel: +1-818-354-6012
