You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that in new matplotlib version they separated classes Axes and Axes3d, so some plotting functions that have 3d aspects don't work as expected anymore. See example in the code below.
Code to Reproduce the Bug
from qutip import qpt_plot_combined
qpt_plot_combined(np.eye(4), [["I", "X", "Y", "Z"]])
Code Output
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[8], line 2
1 from qutip import qpt_plot_combined
----> 2 qpt_plot_combined(np.eye(4), [["I", "X", "Y", "Z"]])
File ~\AppData\Local\pypoetry\Cache\virtualenvs\photonic-component-simulator-biULA8HA-py3.9\lib\site-packages\qutip\tomography.py:143, in qpt_plot_combined(chi, lbls_list, title, fig, ax, figsize, threshold)
140 if not title:
141 title = r"$\chi$"
--> 143 matrix_histogram_complex(chi, xlabels, xlabels, title=title, ax=ax,
144 threshold=threshold)
146 return fig, ax
File ~\AppData\Local\pypoetry\Cache\virtualenvs\photonic-component-simulator-biULA8HA-py3.9\lib\site-packages\qutip\visualization.py:820, in matrix_histogram_complex(M, xlabels, ylabels, title, limits, phase_limits, colorbar, fig, ax, threshold)
818 # x axis
819 xtics = -0.5 + np.arange(M.shape[0])
--> 820 ax.axes.w_xaxis.set_major_locator(plt.FixedLocator(xtics))
821 if xlabels:
822 nxlabels = len(xlabels)
AttributeError: 'Axes3D' object has no attribute 'w_xaxis'
Expected Behaviour
There should be a plot and not an error
Your Environment
QuTiP vesion: '4.7.3'
matplotlib version: '3.8.0'
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Bug Description
It seems that in new matplotlib version they separated classes
Axes
andAxes3d
, so some plotting functions that have 3d aspects don't work as expected anymore. See example in the code below.Code to Reproduce the Bug
Code Output
Expected Behaviour
There should be a plot and not an error
Your Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: