Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Rhino WIP: Matplotlib plots

$
0
0

In Rhino 8, plotting from matplotlib causes a confusing flurry of windows to open over Rhino or would cause a crash. Neither case made it easy to work with this library.

Next build of Rhino WIP includes an Eto backend for matplotlib that supports showing plot windows over an application implementing Eto UI framework. It works the same on macOS and Windows.

Here is how the plot window looks like. It shows up over the script editor and has buttons to export the plot to .png and .svg formats:

How do I use this backend?

Assuming you do not have custom configurations for matplotlib on your system, you do not have do to anything. Rhino automatically configures matplotlib that is loaded in Rhino (See ~/.rhinocode/py313-rh9/matplotlibrc) to use this new backend.

Simply run your script and the plot should show up.

Are plots interactive?

No at the moment. Interactions requires implementing the complete matplotlib drawing API and is considerably more work. Let me know if you absolutely need interaction to work.


This is a new feature and might cause crashes in Rhino. Please save your work before testing and let me know if you see any issues or want other features.

Here is a bunch of pretty plots :smiley: (source)






3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles