Bar legend for a different function in mathematica

  • #1
djymndl07
16
0
How Can I add bar Legend for g[t] in the following code in mathematica?
Thanks in advance?

f[t_] := t + 1
g[t_] := t^3 + 3*t + 12
ParametricPlot[{f[t]*Cos[\[Theta]], f[t]*Sin[\[Theta]]}, {t, 0, 1}, {\[Theta], 0, 2*Pi},
ColorFunction -> Function[{x, y, t}, ColorData["SolarColors"][Rescale[g[t], {g[0], g[1]}, {0, 1}]]]]
 
Physics news on Phys.org
  • #2
Add
Code:
PlotLegends -> BarLegend[{"SolarColors", {0, 1}}]
to the ParametricPlot.
 

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
223
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
449
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
411
  • MATLAB, Maple, Mathematica, LaTeX
Replies
19
Views
358
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
322
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top