gimli-org / gimli

Geophysical Inversion and Modeling Library :earth_africa:
https://www.pygimli.org
Other
344 stars 131 forks source link

Costumizing the pseudosection figure #666

Closed IsabellaLorenzen closed 2 months ago

IsabellaLorenzen commented 2 months ago

Problem description

Hallo!

I have a couple of questions regarding costumizing the pseudosection. I would love to find out how to: 1) Make a title for the figue located above the figure 2) Remove the tick lables on the y axis

Steps to reproduce

This is what i've got so far:

pg.physics.ert.showData(data,"r",label="Resistance (Ohm)",ylabel="Depth level",orientation="vertical",set_title="x",ax=ax)

If possible, please add one or more labels to your issue, e.g. if you expect that your issue is rather a question than a problem with the code, please add the label "question".

halbmy commented 2 months ago

Output of any (2d) show command are

  1. a matplotlib axes
  2. a colorbar handle

With these you can customize your figure using matplotlib commands, see https://matplotlib.org/, e.g.

ax, cb = ert.show(data)
ax.set_xlabel("profile distance (m)")
ax.set_title("This is my title")
ax.set_aspect(2.0)
cb.set_label("blabla")
...
IsabellaLorenzen commented 2 months ago

That worked, thank you!