Display only two axis on a graphic with matplotlib
You may find yourself asking how to display a simple graphic that only displays two axis and not a frame arround which is the default when using matplolib.
Well, you just found the answer.
You only have to store the four axis on a python list, and then set the ones you don’t want to invisible. Here is how it’s done:
Just set spines
index 1
and 3
(or the other two indexes) to visible(False)
and it all works fine.
Here is the graphic:
I know, you want the other two, but that way it wouldn’t be funny. Just try it!