Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit3dea5c7
committed
MNT: also transform vmin/vmax when rendering imshow
We use the Agg resampling routines to resample the user supplied datato the number of pixels we need in the final rendering. The Aggroutines require that the input be in the range [0, 1] and itaggressively clips input and output to that range. Thus, we rescalethe user data to [0, 1], pass it to the resampling routine and thenrescale the result back to the original range. The resampled (shapewise) data is than passed to the user supplied norm to normalize thedata to [0, 1] (again), and then onto the color map to get to RBGA.Due to float precision, the first re-scaling does not round-tripexactly in all casses. The error is extremely small (8-16 orders ofmagnitude smaller than the data) but for values that are exactly equalto the user supplied vmin or vmax this can be enough to push the dataout of the "valid" gamut and be marked as "over" or "under". Thecolormaps default to using the top/bottom color for the over/undercolor so this is not visible, however if the user sets the over/undercolors of the cmap this issue will be visible.closes#169101 parentc3bfeb9 commit3dea5c7
2 files changed
+65
-5
lines changedLines changed: 36 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
460 | 460 |
| |
461 | 461 |
| |
462 | 462 |
| |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
463 | 481 |
| |
| 482 | + | |
464 | 483 |
| |
465 | 484 |
| |
466 | 485 |
| |
467 | 486 |
| |
468 | 487 |
| |
469 | 488 |
| |
470 |
| - | |
471 |
| - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
472 | 493 |
| |
473 | 494 |
| |
474 | 495 |
| |
| |||
478 | 499 |
| |
479 | 500 |
| |
480 | 501 |
| |
481 |
| - | |
| 502 | + | |
| 503 | + | |
482 | 504 |
| |
483 |
| - | |
| 505 | + | |
| 506 | + | |
484 | 507 |
| |
| 508 | + | |
485 | 509 |
| |
486 | 510 |
| |
487 | 511 |
| |
| |||
508 | 532 |
| |
509 | 533 |
| |
510 | 534 |
| |
511 |
| - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
512 | 543 |
| |
513 | 544 |
| |
514 | 545 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1082 | 1082 |
| |
1083 | 1083 |
| |
1084 | 1084 |
| |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + |
0 commit comments
Comments
(0)