Skip to content

Conversation

@mmagnuski
Copy link
Member

vmin and vmax were repeatedly scaled when picks were longer than one leading to almost all images except the first one being almost entirely white. This fixes the problem.

Before:
before

After:
after

Currently, however, if vmin and vmax are None (default) - each epochs image plot will have it's own scale. I'm fine with that, but not sure about others.
This is a small change, do you think it requires test or could I leave it as it is now?

@codecov-io
Copy link

Current coverage is 86.56%

Merging #3359 into master will decrease coverage by <.01%

@@             master      #3359   diff @@
==========================================
  Files           335        335          
  Lines         57319      57319          
  Methods           0          0          
  Messages          0          0          
  Branches       8713       8713          
==========================================
- Hits          49617      49616     -1   
  Misses         5075       5075          
- Partials       2627       2628     +1   

Sunburst

Powered by Codecov. Last updated by 11fc0ef...56d6245

@mmagnuski
Copy link
Member Author

Sorry, the comment about each image having potentially different scale does not apply here (but see #3360).

0, len(data)],
aspect='auto', origin='lower', interpolation='nearest',
vmin=vmin, vmax=vmax, cmap=cmap)
vmin=this_vmin, vmax=this_vmax, cmap=cmap)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok it seems I'm missing something here - won't this fail if not scale_vmin?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. There's also the logical problem of dealing with vmin and vmax when different kinds of channels are plotted at once (grads and mags for example). I guess we'll just have to leave it for the user to sort out.
@mmagnuski are you ok for closing this in favor of #3290 (see https://github.com/mne-tools/mne-python/pull/3290/files#diff-19d699ab3f2a1990a1b4aa1928b6e66aR187)? I'll just add a test for the error pointed out by @jona-sassenhagen there

@jaeilepp
Copy link
Contributor

Yeah, I noticed the same thing recently and there's a fix pending in #3290.

@mmagnuski
Copy link
Member Author

Ok, if you have a fix for this in draggable colorbar - I'm closing. And you are right about the case when vmin and vmax are not scaled - it seems there is no test for this, because travis is happy.

@mmagnuski mmagnuski closed this Jun 29, 2016
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 this pull request may close these issues.

4 participants