Timeline for Bar legend coloring doesn't correspond to array plot coloring in the expected way
Current License: CC BY-SA 3.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 27, 2016 at 20:59 | comment | added | rcollyer |
@Edmund perspective and trade-offs based on who you satisfy. In other words, the usual stuff with complex systems. Evaluate won't protect it as they're inert, all the "magic" happens during the display phase; same with Graphics . So, Evaluate@legendfunction evaluates to legendfunction . It is curious that Pane does protect it, though.
|
|
Jan 27, 2016 at 20:55 | comment | added | Edmund |
@rcollyer So it seems that it is slightly a case of perspective to some degree. That being said Evaluate@ does not protect it. I would expect that this would since it should resolve before PlotLegends gets it. Interesting that Pane@ does protect it.
|
|
Jan 27, 2016 at 20:36 | comment | added | rcollyer |
@Edmund after re-thinking this, I have to say it is only on the surface that it looks like the legend is completely specified. There are several options with Automatic (and other) values that take on what is set in the corresponding plot. For example, LabelStyle , Joined , LegendMarkerSize , etc. are all set by the enclosing plot. To completely specify a legend, then, all of those options will have to be set. This ensures consistent behavior. Otherwise, we would have people complain that we weren't being consistent, and a different group would be left unsatisfied. :)
|
|
Jan 27, 2016 at 20:26 | history | edited | m_goldberg | CC BY-SA 3.0 |
edited title
|
Jan 27, 2016 at 19:55 | answer | added | m_goldberg | timeline score: 3 | |
Jan 27, 2016 at 18:47 | comment | added | a06e | @rcollyer I have to agree with Edmund. Maybe it is not a bug, in the sense that this is how it is designed. But in that case, the design is questionable. | |
Jan 27, 2016 at 17:36 | comment | added | rcollyer |
@Edmund But, the legend functions are special in PlotLegends processing, so things like ColorFunctionScaling -> False are added to ensure that the correct thing is done normally. I will send your comments to the developers, though, as I can see your point.
|
|
Jan 27, 2016 at 17:27 | comment | added | Edmund |
@rcollyer BarLegend[{"BrownCyanTones", {-5, 1}}] completely specifies the legend. The error is that a completely specified legend is being manipulated. There is no request for alteration with this specification. Just as PlotLegends -> "Apples" is not altered so to should PlotLegends -> BarLegend[{"BrownCyanTones", {-5, 1}}] not be altered. BarLegend[{"BrownCyanTones", {-5, 1}}] is a complete expression with no Automatic , Full , or any other symbols that would cause it to be altered.
|
|
Jan 27, 2016 at 17:22 | comment | added | rcollyer |
@Edmund I disagree. The user specified a ColorFunction in both the plot itself and the legend. This was the error as PlotLegends -> Automatic (and variants) will pick up the correct ColorFunction which the documentation states.
|
|
Jan 27, 2016 at 17:22 | review | Close votes | |||
Jan 27, 2016 at 22:49 | |||||
Jan 27, 2016 at 17:17 | comment | added | Edmund |
I would disagree that it is not an error. The documentation clearly states that a legend constructor can be used for PlotLegends and even explictly includes BarLegend in in the list. The OP has used a valid option and a valid expression for the option and has not gotten the expected result.
|
|
Jan 27, 2016 at 17:15 | comment | added | rcollyer | @becko not mine. I think it is a good question. I just upvoted it. | |
Jan 27, 2016 at 17:14 | comment | added | a06e | Why the close vote? It may not be a bug, but the proper way to do this is not in the documentation. So this is a valid question. | |
Jan 27, 2016 at 17:14 | vote | accept | a06e | ||
Jan 27, 2016 at 17:02 | history | edited | rcollyer |
edited tags
|
|
Jan 27, 2016 at 17:02 | comment | added | rcollyer | @Edmund not a bug, user error. | |
Jan 27, 2016 at 16:59 | answer | added | rcollyer | timeline score: 4 | |
Jan 27, 2016 at 16:55 | history | edited | a06e |
edited tags
|
|
Jan 27, 2016 at 16:54 | answer | added | Edmund | timeline score: 3 | |
Jan 27, 2016 at 16:52 | comment | added | Edmund | Can confirm this happens in 10.3 Win 7 Pro 64 bit. | |
Jan 27, 2016 at 16:40 | history | asked | a06e | CC BY-SA 3.0 |