Interactive View Of Plotly Objects Within "Python View" Do Not Display In Default/Current UI

I think the updates to the “Python View” node are exciting, especially in terms of its ability to maintain the interactivity of Plotly objects! :blush:

However, I noted that this ability seems to only function within the “Modern UI Preview” and not the default/current user interface. This seems rather odd since there are no directions which state that it only works within the preview interface (at least, in checking the node’s “description” panel, the KNIME-Python API, and the KNIME Python Integration Guide). I am embarrased to admit that I spent a considerable amount time trying to diagnose why my simple test workflow wasn’t being visualized interactively, only to switch to the Modern UI and discover it had no issues whatsoever within this interface.

Is this intended behavior? Will the Python View’s interactive view only ever work within the “Modern UI Preview” or should it also function within the default/current user interface? As far as I can tell, this is the only visualizer which does not work in the current UI, so this seems inconsistent.

Thanks! :smiley:

For reference, my test workflow consisted of only a “Table Creator” node with simple numeric values (1-5) for two integer columns (X and Y) and a “Python View” node with the following code:

import as knio
import as px
df = knio.input_tables[0].to_pandas()
fig = px.line(df, x=df.columns[0], y=df.columns[1])
knio.output_view = knio.view(fig)

This results in a straight line - a PNG image is generated within the default/current view, but you cannot view the plot interactively unless you are within the “Modern UI Preview” mode.

This is embarrassing, but it seems I was being lazy and was only using the F10 keyboard shortcut or the magnifying-glass icon within the tool bar.

Within the current/default user interface, you will need to right-click the “Python View” node and select “Interactive View: Output” option to achieve this interactive view. I just assumed the shortcut/toolbar would have worked the same as the other visualization nodes, but I was wrong!

I will leave this post standing as a testament to my foolishness! :sweat_smile:

(That said, it would be nice if the shortcut/toolbar did open the interactive view and not “No data to display” instead.)


Glad you found a solution that works for you. No worries about posting something like this - even it it seemed obvious to you in hindsight, it’s still good feedback for us about how users interact with the interface! :+1:

1 Like


we created a ticket for your suggestion, thanks for the input!

Best regards


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.