MBravoS / splotch

Simple PLOTs, Contours and Histograms is a small package with wrapper functions designed to simplify plotting calls from matplotlib.
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

New features in matplotlib v3.4 and splotch #60

Closed MBravoS closed 1 year ago

MBravoS commented 3 years ago

I just noticed that v3.4 has been released (3.4.2 at time of writing), and having a quick look I noticed at least one new feature that could be useful for splotch: the new matplotlib.pyplot.stairs function. This could be useful for plots_1d.hist when passing hist_type='step', as currently we have to add one extra data point to get the same behaviour from matplotlib.pyplot.step. We should still keep the current method for backward compatibility, but could be something to change un the future. Also worth having a more detailed look at everything new with 3.4, might be more things we could use there.

AstroRobin commented 1 year ago

Switched to using plt.stairs() for plotting hist_types='step' and 'stepfilled' in devel@e55c572. Functionality is exactly what we needed and negates the need for the custom step_filler functions, these can be removed from base_func.py in a later version.