Error keyword grid_b is not recognized
rlantigua1 opened this issue · 1 comments
I'm getting this error following your steps
All libraries loaded
Number data points 5868 from 1999-11-01 to 2023-02-27
Traceback (most recent call last):
File "project.py", line 80, in
plt.grid(b=None, which='major', axis='y', linestyle='--')
File "C:\Python38\lib\site-packages\matplotlib\pyplot.py", line 2589, in grid
return gca().grid(visible=visible, which=which, axis=axis, **kwargs)
File "C:\Python38\lib\site-packages\matplotlib\axes_base.py", line 3198, in grid
self.yaxis.grid(visible, which=which, **kwargs)
File "C:\Python38\lib\site-packages\matplotlib\axis.py", line 1655, in grid
self.set_tick_params(which='major', **gridkw)
File "C:\Python38\lib\site-packages\matplotlib\axis.py", line 927, in set_tick_params
kwtrans = self._translate_tick_params(kwargs)
File "C:\Python38\lib\site-packages\matplotlib\axis.py", line 1071, in _translate_tick_params
raise ValueError(
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']
ohh... this fixed this error
All cases of:
plt.grid(b=None, which='major', axis='y', linestyle='--')
should be replaced by:
plt.grid(visible=None, which='major', axis='y', linestyle='--')