Skip to content

cannot specify colormap for quiver #11

@yichechang

Description

@yichechang

using the following to specify colormap for quiver plot doesn't work

quiver.quiverplot_from_piv(
    piv=piv, 
    ...
    quiver_kwargs={'cmap': 'twilight'},
    ...
)

raising

TypeError: quiver() got multiple values for keyword argument 'cmap'

Underlying issue

Related lines:
https://github.com/yichechang/abc-mobility/blob/44ae18d1b01fd65a4d863066740a19eaa5612487/abcdcs/abcdcs/quiver.py#L240-L257

probably keeping DEFAULT_QUIVER_CMAP_ANGLE inside DEFAULT_QUIVER_KWARGS will fix the problem. but also need to consider dispatching for colorby='angle' and colorby='amp'


Current workaround

Modify this default value first before calling the plotter via

quiver.DEFAULT_QUIVER_CMAP_ANGLE = 'twilight_shifted'
quiver.quiverplot_from_piv(...)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions