Timeline for How to define the colorbar of my plot manually
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 21, 2020 at 12:23 | vote | accept | AmirHosein Sadeghimanesh | ||
Jun 21, 2020 at 12:01 | answer | added | C. E.♦ | timeline score: 3 | |
Jun 21, 2020 at 11:14 | comment | added | AmirHosein Sadeghimanesh |
@C.E. I also don't get any colorbar when adding the BarLegend in Show for a list of plots, i.e. Show[plist, PlotLegends -> BarLegend[{Blend[{{0, RGBColor[0, 0, 1]}, {0.13, RGBColor[1, 0, 0]}},#] &, {0, 0.13}}]] :(
|
|
Jun 21, 2020 at 11:10 | comment | added | AmirHosein Sadeghimanesh |
@C.E.Using BarLegend[{Blend[{{0, RGBColor[0, 0, 1]}, {0.13, RGBColor[1, 0, 0]}}, #] &, {0, 0.13}}] alone is working fine, but ListPlot[{{0, 0}, {1/2, 1}, {1/4, 4/5}, {1, 0}}, PlotStyle -> Directive[RGBColor[1, 0, 1], PointSize[0.02]], AspectRatio -> 1, PlotLegends -> BarLegend[{Blend[{{0, RGBColor[0, 0, 1]}, {0.13, RGBColor[1, 0, 0]}},#] &, {0, 0.13}}]] has a problem in color scaling. Do you know why?
|
|
Jun 21, 2020 at 11:04 | comment | added | AmirHosein Sadeghimanesh | @C.E. and kglr thanks to both of you, yes both are producing what I want :) | |
Jun 21, 2020 at 10:20 | comment | added | C. E.♦ |
You may also be interested in Blend .
|
|
Jun 21, 2020 at 10:06 | comment | added | kglr |
does something like minmax = {.3, .9}; BarLegend[{RGBColor[#, 0, 1 - #] &, minmax}] or BarLegend[{RGBColor[#, 0, 1 - #] &@Rescale[#, minmax] &, minmax}] give what you need?
|
|
Jun 21, 2020 at 9:57 | history | asked | AmirHosein Sadeghimanesh | CC BY-SA 4.0 |