- #1

- 50

- 0

I plot a Contour plot from a function with mathematica, but I dont know how can I add a small box near my figure that explain which value refer to which color?

I put my code below, please help me with adding colordata to my code for having reference for colors.

t = 0.01;

m = 0.7820;

ContourPlot[(3 (2 + m t (4 + m t)) - 4 (1 + m t) Cos[\[Pi] x] -

2 Cos[2 \[Pi] x] - 4 (1 + m t) Cos[\[Pi] y] - 2 Cos[2 \[Pi] y] +

4 Cos[\[Pi] (-x + y)] - 4 (1 + m t) Cos[\[Pi] (x + y)] -

2 Cos[2 \[Pi] (x + y)] + 4 Cos[\[Pi] (2 x + y)] +

4 Cos[\[Pi] (x + 2 y)])/(m (6 + m t (6 + m t) -

2 Cos[2 \[Pi] x] - 2 Cos[2 \[Pi] y] -

2 Cos[2 \[Pi] (x + y)])), {x, 0, 2}, {y, 0, 2}]