how can I disable ygrid?

Hi guys, how can i tell matplotlib to only show the xgrid

    > (grid without y -lines :wink: ) I?ve searched and googled a
    > lot. But i can?t find a solution.

You should be able to toggle the grid separately with

  ax.xaxis.grid(True)
  ax.yaxis.grid(False)

Note that the grid command takes optional kwargs to control the major
and minor tick gridding.

JDH

John Hunter wrote:

    > Hi guys, how can i tell matplotlib to only show the xgrid
    > (grid without y -lines :wink: ) I´ve searched and googled a
    > lot. But i can´t find a solution.

You should be able to toggle the grid separately with

  ax.xaxis.grid(True)
  ax.yaxis.grid(False)

Note that the grid command takes optional kwargs to control the major
and minor tick gridding.

JDH
  

Thanks for your help.
I´ve tried to work with axvline instead, but sadley avline can´t handle vectors/arrays.

Volker

···

--
-----------------------
Volker Lorrmann
Universität Würzburg
Experimentelle Physik 6
Am Hubland
97074 Wuerzburg
Germany
Tel: +49 931 888 5770
volker.lorrmann@...1264...