Skip to content

ENH: plot_topomap, plot_joint & plot: API homogeneity for scalings/scale parameters #3702

Closed

Description

@kingjr

Small API heterogenity: different plotting functions use similar parameters slightly differently (and named slightly differently)

  • scaling: evoked.plot(scalings=dict()) but evoked.plot_topomap(scale=dict() | float)
  • units: evoked.plot(units=dict()) but evoked.plot_topomap(unit=dict() | str)
  • max amplitude: evoked.plot(ylim=dict()) but evoked.plot_topomap(vmin=dict() | float, vmax=dict() | float())

Changing parameter names can be annoying for deprecation, but I suggest we at least make their input similar (e.g. always accepts both dict and float).

Additionally, evoked.plot_joint() could gather the parameters common to plot() and plot_topomap() to simplify it. WDTY @jona-sassenhagen ?

Activity

  1. jona-sassenhagen commented on Oct 26, 2016

    @jona-sassenhagen
    Contributor

    Somewhat related: #3164

  2. jona-sassenhagen commented on Oct 26, 2016

    @jona-sassenhagen
    Contributor

    Unity here would be a great improved IMO.

    We must be careful however with how different functions handle different channel types.

  3. jona-sassenhagen commented on Oct 27, 2016

    @jona-sassenhagen
    Contributor

    Can we split this into multiple smaller PRs?

  4. jaeilepp commented on Oct 27, 2016

    @jaeilepp
    Contributor

    It feels a bit redundant to have scaling and vmin, vmax in the first place. Could we get rid of scaling in for instance topomaps or is there a use case where you'd prefer using scaling?

  5. agramfort commented on Oct 27, 2016

    @agramfort
    SponsorMember
  6. jona-sassenhagen commented on Oct 27, 2016

    @jona-sassenhagen
    Contributor

    I think you need scaling if you use for example stats.regression, where you plot t values on data channels.

  7. jona-sassenhagen commented on Nov 29, 2016

    @jona-sassenhagen
    Contributor

    Ugh I must get back to this. @jaeilepp can you maybe assign me so I don't forget?

  8. jaeilepp commented on Nov 29, 2016

    @jaeilepp
    Contributor

    Done.

  9. jona-sassenhagen commented on Dec 6, 2016

    @jona-sassenhagen
    Contributor

    Also: mne.viz.plot_compare_evokeds is missing a bunch of options, like scalings and units.

    :(

  10. jona-sassenhagen commented on Dec 6, 2016

    @jona-sassenhagen
    Contributor

    @Eric89GXL @agramfort do you have any idea about solving the different names for identical params for different functions (e.g., "unit" vs "units")?

    I guess a **kwargs could do, but we never use that (in public functions), so ...

  11. larsoner commented on Dec 7, 2016

    @larsoner
    Member
  12. larsoner commented on Dec 7, 2016

    @larsoner
    Member
  13. added this to the 0.15 milestone on Apr 18, 2017
  14. self-assigned this
    on Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions