ResidentMario / missingno

Missing data visualization module for Python.
MIT License
3.9k stars 516 forks source link

Replace (b=False) with (False) #168

Open enarroied opened 12 months ago

enarroied commented 12 months ago

Hi,

I have an error when I do the demo example. I think it comes from the deprecation of the b parameter in matplotlib.

For reference: https://github.com/matplotlib/matplotlib/issues/25267

Thank you! |------------|

Here is my complete traceback:

ValueError Traceback (most recent call last) Cell In[29], line 2 1 import missingno as msno ----> 2 matrix = msno.matrix(df_iris) 3 matrix.get_ax().grid(False)

File ~\anaconda3\envs\low\lib\site-packages\missingno\missingno.py:72, in matrix(df, filter, n, p, sort, figsize, width_ratios, color, fontsize, labels, sparkline, inline, freq, ax) 70 # Remove extraneous default visual elements. 71 ax0.set_aspect('auto') ---> 72 ax0.grid(b=False) 73 ax0.xaxis.tick_top() 74 ax0.xaxis.set_ticks_position('none')

File ~\AppData\Roaming\Python\Python310\site-packages\matplotlib\axes_base.py:3194, in _AxesBase.grid(self, visible, which, axis, kwargs) 3192 _api.check_in_list(['x', 'y', 'both'], axis=axis) 3193 if axis in ['x', 'both']: -> 3194 self.xaxis.grid(visible, which=which, kwargs) 3195 if axis in ['y', 'both']: 3196 self.yaxis.grid(visible, which=which, **kwargs)

File ~\AppData\Roaming\Python\Python310\site-packages\matplotlib\axis.py:1660, in Axis.grid(self, visible, which, kwargs) 1657 if which in ['major', 'both']: 1658 gridkw['gridOn'] = (not self._major_tick_kw['gridOn'] 1659 if visible is None else visible) -> 1660 self.set_tick_params(which='major', gridkw) 1661 self.stale = True

File ~\AppData\Roaming\Python\Python310\site-packages\matplotlib\axis.py:932, in Axis.set_tick_params(self, which, reset, **kwargs) 919 """ 920 Set appearance parameters for ticks, ticklabels, and gridlines. 921 (...) 929 gridlines. 930 """ 931 _api.check_in_list(['major', 'minor', 'both'], which=which) --> 932 kwtrans = self._translate_tick_params(kwargs) 934 # the kwargs are stored in self._major/minor_tick_kw so that any 935 # future new ticks will automatically get them 936 if reset:

File ~\AppData\Roaming\Python\Python310\site-packages\matplotlib\axis.py:1076, in Axis._translate_tickparams(kw, reverse) 1074 for key in kw: 1075 if key not in allowed_keys: -> 1076 raise ValueError( 1077 "keyword %s is not recognized; valid keywords are %s" 1078 % (key, allowedkeys)) 1079 kwtrans.update(kw) 1080 return kwtrans

ValueError: keyword grid_b is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_data', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gapcolor', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_mouseover', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ds', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']

minhazulislam commented 2 months ago

I am getting the same error. Is anyone working on it? Or is there any workaround?

I used the version '0.4.2' and updated the version to '0.5.2'. Still getting the error - "ValueError: keyword grid_b is not recognized"