P4D-Data-Sciences icon indicating copy to clipboard operation
P4D-Data-Sciences copied to clipboard

MatplotLibGallery Demo error: 'Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure'

Open unununununununun opened this issue 3 years ago • 7 comments

Throws an error when trying to draw image

Solution: pip install pyqt5

...then works ok

image

unununununununun avatar Jul 28 '22 00:07 unununununununun

Maybe add a pyqt5 component?

peardox avatar Aug 01 '22 13:08 peardox

I'd love a pull request introducing pyqt5.

lmbelo avatar Aug 02 '22 13:08 lmbelo

I'll go find a selection of handy modules to add to the collection as there are others that are obvious (keras springs to the top of the list but then so do more...)

So far I've only built ones I'll actually use myself (or to fix a Issue for CV2_Contrib)

peardox avatar Aug 02 '22 13:08 peardox

pyqt5

Should have assigned to me - doing it now (want rembg + boto3 for personal uses) I can do simple stuff like this without problem (the more esoteric stuff I need help with)

peardox avatar Aug 05 '22 06:08 peardox

Crap - QT5 non MIT

PyQt5 is dual licensed on all platforms under the Riverbank Commercial License and the GPL v3. Your PyQt5 license must be compatible with your Qt license. If you use the GPL version then your own code must also use a compatible license.

Including (extremely short) readmes for new modules

peardox avatar Aug 05 '22 07:08 peardox

I just wrote the pyqt5 component and tested it with this demo - result was an assertion error

This test was simply a case of dropping the component on the form and selecting the env.

Examining the demo there's no setup, install or import so possibly something is going wrong at that stage

See https://github.com/Embarcadero/P4D-Data-Sciences/pull/15

peardox avatar Aug 05 '22 10:08 peardox

@unununununununun

https://github.com/Embarcadero/P4D-Data-Sciences/pull/16 makes it work

There is still an error on starting but I think this is just not having initialised QT5 or something. After the initial issue charts now plot

Just add a PyQT5 component to your form and set it's environment as it's almost there.

Can someone who knows how QT5 works suggest how to stop the startup junk pls?

peardox avatar Aug 05 '22 12:08 peardox