-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FigureCanvasQTAgg' object has no attribute '_update_dpi' #2
Comments
What version of matplotlib? |
Hi Jorn,
2.0.0
Regards, Knut
(never experienced this problem before, but also did not use pyncview
for a long time)
…On 2/28/20 3:18 PM, jornbr wrote:
What version of matplotlib?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AC2RV6XFAP6XG725JDPWUNDRFEMMVA5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENIVKVI#issuecomment-592532821>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2RV6QAGSEVBSHIGOSNWHDRFEMMVANCNFSM4K45NJQQ>.
|
Hi Knut, I'm afraid the only solution at the moment is to update to the latest MatPlotLib 2.2. PyNcView/xmlplot inherit from, and adapt, the MPL Qt backend. Therefore they do not work with all (older) MatPlotLib versions… Best, Jorn |
Dear Jorn,
thanks for your help. I now installed matplotlib for python3 via pip3.
How can I tell/re-install pyncview to use python3?
Cheers, Knut
…On 2/28/20 5:39 PM, jornbr wrote:
Hi Knut,
I'm afraid the only solution at the moment is to update to the latest
MatPlotLib 2.2. PyNcView/xmlplot inherit from, and adapt, the MPL Qt
backend. Therefore they do not work with all (older) MatPlotLib versions…
Best,
Jorn
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AC2RV6VHHJFZVUFLODPE5KTRFE44HA5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJEOZY#issuecomment-592594791>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2RV6TZNNTGWR3UZKPWE2DRFE44HANCNFSM4K45NJQQ>.
|
pip3 install pyncview -- user
tir. 3. mar. 2020 17.14 skrev knutaros <[email protected]>:
… Dear Jorn,
thanks for your help. I now installed matplotlib for python3 via pip3.
How can I tell/re-install pyncview to use python3?
Cheers, Knut
On 2/28/20 5:39 PM, jornbr wrote:
>
> Hi Knut,
>
> I'm afraid the only solution at the moment is to update to the latest
> MatPlotLib 2.2. PyNcView/xmlplot inherit from, and adapt, the MPL Qt
> backend. Therefore they do not work with all (older) MatPlotLib versions…
>
> Best,
>
> Jorn
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
#2?email_source=notifications&email_token=AC2RV6VHHJFZVUFLODPE5KTRFE44HA5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJEOZY#issuecomment-592594791
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AC2RV6TZNNTGWR3UZKPWE2DRFE44HANCNFSM4K45NJQQ
>.
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=ACVA42MUBRSSJ7NN65FVZVLRFUUF3A5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENUDTZY#issuecomment-594033127>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACVA42OF7QRFCXCQ3KV4OBLRFUUF3ANCNFSM4K45NJQQ>
.
|
On 3/3/20 5:32 PM, Karsten Bolding wrote:
pip3 install pyncview -- user
thanks karsten. installation worked. (and for the manual way I would do
python3 setup.py?)
anyhow, after installing pyqt4 for python3 I now get this error:
pyncview flexout.nc
Unable to import xmlplot (https://pypi.python.org/pypi/xmlplot) Try "pip
install xmlplot". Error: cannot import name 'FigureCanvasQT'
but even after
pip3 install --user xmlplot
the error still exists.
btw: do I need to add your direct mail addresses, or do you already
receive from github?
…
tir. 3. mar. 2020 17.14 skrev knutaros ***@***.***>:
> Dear Jorn,
>
> thanks for your help. I now installed matplotlib for python3 via pip3.
> How can I tell/re-install pyncview to use python3?
>
> Cheers, Knut
>
> On 2/28/20 5:39 PM, jornbr wrote:
> >
> > Hi Knut,
> >
> > I'm afraid the only solution at the moment is to update to the latest
> > MatPlotLib 2.2. PyNcView/xmlplot inherit from, and adapt, the MPL Qt
> > backend. Therefore they do not work with all (older) MatPlotLib
versions…
> >
> > Best,
> >
> > Jorn
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> > <
>
#2?email_source=notifications&email_token=AC2RV6VHHJFZVUFLODPE5KTRFE44HA5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJEOZY#issuecomment-592594791
> >,
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AC2RV6TZNNTGWR3UZKPWE2DRFE44HANCNFSM4K45NJQQ
> >.
> >
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
>
<#2?email_source=notifications&email_token=ACVA42MUBRSSJ7NN65FVZVLRFUUF3A5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENUDTZY#issuecomment-594033127>,
> or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/ACVA42OF7QRFCXCQ3KV4OBLRFUUF3ANCNFSM4K45NJQQ>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AC2RV6X2LAS2SQAW7YREYQTRFUWLRA5CNFSM4K45NJQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENUF66I#issuecomment-594042745>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2RV6VADIJDQM5GK4U2BYTRFUWLRANCNFSM4K45NJQQ>.
|
Hi Knut, Jorn, Karsten and everybody interested, I just had the same error recently, and I have found out the solution. For the latest versions of Matplotlib (in my case I use Matplotlib 3.4.1) for Xmlplot package in mpl_backend_qt4.py file in the line 44 it you should change if self._update_dpi(): then everything works smooth and fine. Best, |
Hi, thanks, Elena, for finding the solution! I have been struggling with this for quite some time. It seems to me that in matplotlib 3.3.4 (and – I assume – in earlier versions, too), the method is called We should not ignore this issue, because people will update their matplotlib at one point, and then they will run into this problem (this happened to me). So I'm wondering what the best way to fix it would be.
I'd be interested to hear your thoughts on this, @jornbr ! Best regards, |
It appears to me that this issue is solved with the newer versions of matplotlib. With matplotlib version 3.5, I have no problems with pyncview any more, and I did not need to do any of the proposed changes. I suggest marking this issue as solved. |
Traceback (most recent call last):
File "/home/kklingbe/.local/lib/python2.7/site-packages/xmlplot-0.9.17-py2.7.egg/xmlplot/mpl_backend_qt4.py", line 43, in paintEvent
if self._update_dpi():
AttributeError: 'FigureCanvasQTAgg' object has no attribute '_update_dpi'
The text was updated successfully, but these errors were encountered: