Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverted colormaps in sw_plotspec #131

Closed
mducle opened this issue Mar 2, 2023 · 0 comments · Fixed by #180
Closed

Inverted colormaps in sw_plotspec #131

mducle opened this issue Mar 2, 2023 · 0 comments · Fixed by #180

Comments

@mducle
Copy link
Member

mducle commented Mar 2, 2023

sw_plotspec allows users to specify a colormap with the 'colormap' option but then inverts the scale.

The relevant code is here where it calls sw_multicolor to do the actual plot. However, the final parameter which indicates whether to flip the colormap or not is always set to true. (This is needed for the default color scheme which is an inverted magma colormap, but is annoying for users).

We should change this to either:

  1. Add a new option to flip or not flip the colormap
  2. Just remove the flipping and don't have an option
  3. Keep current behaviour but amend the help file to state that the colormaps will be inverted (!)

I would prefer option 2 (users can flip their colormaps manually before passing to sw_plotspec!). However, in this case we would also need to remove the flipud call in line 434.

mducle added a commit that referenced this issue Apr 25, 2024
@mducle mducle mentioned this issue Apr 25, 2024
mducle added a commit that referenced this issue May 20, 2024
* Fix bug where imag always plots in auto mode #172

* Allow row vector for hkl for single point #179

* Fix inverted user colormap #131

* Refactor sw_plotspec to avoid recursive calls #132

* Add fitspec fixes suggested by K Richardson #98

* Add spinw obj to spec for twin cases in fitspec #158

* Fix spec spinw object issues in fitmode

spinwave() now creates a .obj field regardless
  When fitmode=true, this a barebones struct
  When fitmode=false, this is a full spinw object
Fix issue with sw_plotspec when using fastmode/fitmode
Add basic test for fitspec() to check twins handling

* Fix bug in sw_plotspec 'fastmode' handling

* Fix issues from review. Add change log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant