Hi, in fact I get the major gridlines in the result, you do not see them?
I am able to manipulate the figure in the following way: first get the figure by get_fig, then manipulate it and save another png (the
stdev.png and new.png will be saved...)
import numpy as np
import smtk.trellis.trellis_plots as trpl
gmpe_list = ["AkkarBommer2010", "AkkarCagnan2010", "AkkarEtAlRjb2014", "BooreAtkinson2008", "ChiouYoungs2008", "ZhaoEtAl2006Asc"]
imts = ["PGA", "SA(0.2)", "SA(1.0)", "SA(2.0)"]
params = {"ztor": 5.0, # Topofrupturedepth
"hypo_depth": 10.0, # Hypocentraldepth
"vs30": 800.0, # Vs30forallsites
"vs30measured": True, # Vs30valueismeasured
"z1pt0": 100.0, # Depth(m)tothe1.0km/sVsinterface
"dip": 90.0, # VerticalFault
"rake": 0.0 # Strike-slipfault
}
magnitudes = np.arange(4.5, 8.1, 0.1)
distances = {"repi": 20.0, "rhypo": 22.5, "rjb": 15.0, "rrup": 16.0, "rx": 15.0}
#tp.plot()
tp = trpl.MagnitudeSigmaIMTTrellis(magnitudes, distances, gmpe_list, imts, params, stddevs ="Total", figure_size=(7, 5), filename="stdev", legend_fontsize = 10, filetype="png")
fig = tp.get_fig()
fig.axes[0].grid(which='major',color='r', linestyle=':')
fig.axes[0].minorticks_on()
fig.axes[0].grid(b=True, which='minor', color='#999999', linestyle='-', alpha=0.2)
fig.savefig('new.png')
axes[0] is for the first of the 4 subplots you get in the trellis plot.
Peter
Dátum: piatok 30. apríla 2021, čas: 10:44:55 UTC+2, odosielateľ:
saf...@gmail.com