0

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.

Kuba
  • 136,707
  • 13
  • 279
  • 740
  • 1
    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! –  Aug 06 '18 at 18:47

1 Answers1

1

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

Rom38
  • 5,129
  • 13
  • 28