Bar legend for a different function in mathematica

  • #1
djymndl07
11
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
75
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
315
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
270
  • MATLAB, Maple, Mathematica, LaTeX
Replies
19
Views
179
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
147
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top