Skip to content
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

Issues plotting covariance estimation_results['posterior'].plot_covariance() #145

Open
mcurmei627 opened this issue Apr 26, 2018 · 0 comments

Comments

@mcurmei627
Copy link

When trying to plot covariance I ran into the following issue

~\AppData\Local\Continuum\Anaconda3\envs\qsharp-samples\lib\site-packages\qinfer\smc.py in plot_covariance(self, corr, param_slice, tick_labels, tick_params)
   1159         cov = self.est_covariance_mtx(corr=corr)[param_slice, param_slice]
   1160 
-> 1161         retval = mpls.hinton(cov)
   1162         plt.xticks(*tick_labels, **(tick_params if tick_params is not None else {}))
   1163         plt.yticks(*tick_labels, **(tick_params if tick_params is not None else {}))

~\AppData\Local\Continuum\Anaconda3\envs\qsharp-samples\lib\site-packages\mpltools\special\hinton.py in hinton(inarray, max_value, use_default_ticks)
     54 
     55     ax = plt.gca()
---> 56     ax.set_axis_bgcolor('gray')
     57     # make sure we're working with a numpy array, not a numpy matrix
     58     inarray = np.asarray(inarray)

AttributeError: 'AxesSubplot' object has no attribute 'set_axis_bgcolor'

https://github.com/QInfer/python-qinfer/blob/e90cc57d50f1b48148dbd0c671eff6246dda6c31/src/qinfer/smc.py

Recent versions of matplotlib have replaced it by set_facecolor. Mpltools uses the old attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant