In Mathematica 8.
Given this:
f[x_, y_, z_] := z - x^2 - y^2 (*relation among the variable f[x,y,z]==0*)
parameter = Range[0.1, 1, 0.1];(*choice of parameter values*)
I'm trying to plot the level curves
ContourPlot[Evaluate@Table[f[x, y, z] == 0, {z, parameter}], {x, -1, 1}, {y, -1,1}, PlotLegends -> parameter]
I have the next error message:
ContourPlot::optx: "Unknown option PlotLegends in ContourPlot[{0.1 -x^2-y^2==0,0.2 -x^2-y^2==0,0.3 -x^2-y^2==0,0.4 -x^2-y^2==0,0.5 -x^2-y^2==0,0.6 -x^2-y^2==0,0.7 -x^2-y^2==0,0.8 -x^2-y^2==0,0.9 -x^2-y^2==0,1. -x^2-y^2==0},{x,-1,1},{y,-1,1},PlotLegends->parameter]"
I tried using:
Needs["PlotLegends`"]
ShowLegend[
ContourPlot[Evaluate@Table[f[x, y, z] == 0,
{z, parameter}], {x, -1, 1}, {y, -1,1}, PlotLegends -> parameter] ]
what I should do?
Comments
Post a Comment