Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. data = Table[{m/100, n/100, 2 + (m^2 + n^2)/20000}, {m, 0, 100}, {n, 0, 100}];
  2. data = Flatten[data, 1];
  3. contour = Range[2, 3, 0.05];
  4. contourplot =
  5. ListContourPlot[data,
  6. Axes -> True,
  7. ColorFunction ->ColorData["BlueGreenYellow"],
  8. Contours -> contour,
  9. PlotRange -> {2, 3},
  10. PlotLegends -> Automatic]
  11.  
  12. contourplot =
  13. ListContourPlot[data,
  14. Axes -> True,
  15. ColorFunction -> ColorData["BlueGreenYellow"],
  16. Contours -> contour,
  17. PlotRange -> {2, 3},
  18. ContourLabels ->
  19. (If[MemberQ[{2.25, 2.5, 2.75}, #3],
  20. Text[Framed[#3], {#1, #2}, Background -> White]] &),
  21. PlotLegend->Automatic]
  22.  
  23. data = Table[{m/100, n/100, 2 + (m^2 + n^2)/20000}, {m, 0, 100}, {n, 0, 100}];
  24. data = Flatten[data, 1];
  25. contour = Range[2, 3, 0.05];
  26. contourplot =
  27. ListContourPlot[data,
  28. Axes -> True,
  29. ColorFunction -> (ColorData["BlueGreenYellow"][Rescale[#1, {2, 3}]] &),
  30. ColorFunctionScaling -> False,
  31. Contours -> contour,
  32. ContourLabels ->
  33. (If[MemberQ[{2.25, 2.5, 2.75}, #3],
  34. Text[Framed[#3], {#1, #2}, Background -> White]] &),
  35. PlotLegends -> BarLegend[{Automatic, {2, 3}}]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement