Forum Archive

Mathplotlib grid

tomkirn

Hi,

I tried a simple plot via plt.plot and have trouble with plt.grid(True). Result is 'TypeError: bool object is not callable'. Same code works fine on MacOs.

Any hints?

Regards
Tom

ccc

plt.grid = True

__ EDIT: This is wrong. See the correct answer from OMZ below__.

omz

It seems likely that you used plt.grid = True somewhere, replacing the grid method with a boolean value. The easiest would be to restart Pythonista (quit from task switcher) and then use plt.grid(True).

tomkirn

You are absolute correct. My fault. Restarting Pythonista helps. Many thanks!