0
$\begingroup$

I want to include color bar for my plot. I have done the plot using the following code:

ListPlot3D[Eρg
, PlotRange -> All
, ColorFunction -> Function[{Sw, ϕ, Eρg}, Hue[Eρg]]
, AxesLabel -> {"Sw", "ϕ", "Eρg"}
 ]

But I need to include color bar. Kindly tell me what to do.

$\endgroup$
1
  • 1
    $\begingroup$ But welcome to Stack Exchange... I know it can seem a bit challengingly complex at first with all the different sites and rules on what goes where and such. But hope you'll stick with it and continue to get involved with the site, it's worth it! $\endgroup$
    – JeopardyTempest
    Commented Aug 6, 2018 at 18:47

1 Answer 1

1
$\begingroup$

I guess you needs this:

ListPlot3D[...bla-bla-bla...,PlotLegends->BarLegend[{Hue, {0, 0.7}}, 10]]

it will give your plot with following at the right:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.