Closed Goddysen closed 3 years ago
@Goddysen this is not a bug, the ax
argument should be used only when you have an existing matplotlib Axes
object onto which you want to draw the plot. Example in EVA
:
For what you want you shouldn't use the ax
argument and instead use the ax
object you create and edit its children. You can do something like this:
fig, ax = plot_extremes(
ts=series,
extremes=extremes,
extremes_method="BM",
extremes_type="high",
block_size="365.2425D",
figsize=(10, 4),
)
for line in ax.get_lines():
line.set_color("green")
I suggest you read this stackoverflow post and matplotlib axes documentation.
I got your point! Thank you very much for your answer!
about the plot_corner() function
HELLOW!
THE CODE USED IN JUPYTER ARE LISTED AS FOLLOWS:
fig_4, ax_4 = plot_corner( trace=model_1.trace, trace_map=model_1.trace_map, burn_in=50, labels=[r"Shape, $\xi$", r"Location, $\mu$", r"Scale, $\sigma$"], levels=5, )
ax_4[0][0] #IT DISPLAY xlabel='Shape, ylabel='Scale, ax_4[1][0] #IT DISPLAY xlabel='Shape, ylabel='Scale, AGAIN ax_4[2][0] #IT DISPLAY xlabel='Shape,, ylabel='Scale AGAIN
WHAT'S THE ORDER OF THESE PLOT (AXES) IN LIST?
Thanks!Looking forward to your answer
@Goddysen thank you for pointing this out, this is a genuine bug. Was easy to fix. New pyextremes version should appear on PyPI today and conda tomorrow.
Once you get new version (2.2.4) the axes are located left-to-right and top-to-bottom: e.g. left upper corner is [0][0] and right bottom corner is [2][2] or [-1][-1].
THE CODE ARE LISTED AS FOLLOWS:
THE ERROR ARE LISTED: TypeError: invalid type in <class 'dict'> for the 'ax' argument, must be matplotlib Axes object
what is the right form for the argument "ax" and how to change it
Thanks