Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ClearAll["Global`*"];
- f[x_, y_] := x + y^-1;
- p = ContourPlot[
- f[x, y], {x, -5, 5}, {y, -5, 5},
- Contours -> 10,
- ContourLabels -> True,
- LabelStyle -> {Directive[Bold, Medium], White,
- RotateLabel -> True},
- ImageSize -> Large
- ]
- f[x_, y_] := x + y^-1
- t[x_, y_] = Grad[f[x, y], {x, y}] . {{0, -1}, {1, 0}};
- ContourPlot[
- f[x, y],
- {x,-5,5},
- {y,-5,5},
- Contours->10,
- ContourLabels->Function[{x,y,z},Text[z,{x,y},{0,0},t[x,y], BaseStyle->FontColor->White]]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement