hnn-core
hnn-core copied to clipboard
Add more options to plot_spikes_hist for HNN-style histograms
Towards the goal of using hnn-core plots in HNN GUI, plot_spikes_hist()
would be a good first example. If a suitable function was availble in hnn-core, it would make spikefn.py
one step closer to being deprecated (https://github.com/jonescompneurolab/hnn/issues/237)
The HNN spikefn.plot_hist()
has some more parameters that aren't found in viz.plot_spikes_hist()
in hnn-core:
https://github.com/jonescompneurolab/hnn/blob/master/spikefn.py#L235-L247
Basically, HNN needs an enhanced plot_spikes_hist()
with tstop
(xlim), color specification, histtype
, linewidth
. This could be a separate function for plotting 'bar' histogram types.
https://github.com/jonescompneurolab/hnn-core/blob/c879ce58d2c57171ded58df3537acdb4a20f708a/hnn_core/viz.py#L51-L73
Example calls are in https://github.com/jonescompneurolab/hnn/blob/master/simdat.py#L340-L353
I would argue against adding any matplotlib parameters, because users have access to the figure handle. Otherwise, we risk polluting the function signature.
But we can make the defaults match what is there in the GUI, I think that's reasonable.
I think we should add parameters for bins and color because they cannot easily be changed with the figure handle of a histogram.
we could expose **kwargs that gets passed to ax.hist
. So any customization the user wants can be done via that.
@jasmainak is this issue still open?