Student Support Forum > General > > "Problem with plot of discontinuous function"

 Post Reply: Name: Email Address: Please send email when my message is replied to. Url (optional): Subject: Message: view original message? Attachment (optional): Please answer this: 1+4 =

 Original Message (ID '372668') By yehuda: OK, I managed to use the new PlotLegends to generate what you wanted. Just modify the labels to what you need or leave it as it is, to show the expressions markers = Graphics[Circle[{0, 0}, {0.1, 0.1}]]; ContourPlot[{(x/s1t)^2 - x*y/(s1t*s2t) + (y/s2t)^2 == 1, (x/s1t)^2 + (y/s2t)^2 + x*y*(1/(s1t^2) - 1/(s2t^2)) == 1, x^2/(s1t^2) + y^2/(s2t^2) - x*y/(s1t^2) == 1, x^2/(s1t*Abs[s1c]) + y^2/(s2t*Abs[s2c]) + (1/s1t - 1/Abs[s1c])* x + (1/s2t - 1/Abs[s2c])*y + 2*x*y*1/(2*s45^2)*(1 - (1/s1t - 1/Abs[s1c] + 1/s2t - 1/Abs[s2c])* s45 - (1/(s1t*Abs[s1c]) + 1/(s2t*Abs[s2c]))*s45^2) == 1, x^2/Abs[(s1t*s1c)] + y^2/Abs[(s2t*s2c)] + (1/s1t - 1/Abs[s1c])* x + (1/s2t - 1/Abs[s2c])*y - 1/(2*Sqrt[s1t*s1c*s2t*s2c]) == 1, x^2/Abs[(s1t*s1c)] + y^2/Abs[(s2t*s2c)] + (1/s1t - 1/Abs[s1c])* x + (1/s2t - 1/Abs[s2c])*y + 1/Sqrt[s1t*s1c*s2t*s2c] - 1/(2*S^2) == 1, (x/s1t)^2 + (y/s2t)^2 == 1, (x/s1t)^2 + (y/s2t)^2 - x*y/(s1t*s2t) == 1, (x*y - x^2)/(s1t*s1c) - (y^2/(s2t*s2c)) + x*(s1t + s1c)/(s1t*s1c) + y*(s2c + s2t)/(s2t*s2c) == 1, (1.95*x*y - x^2)/(s1t*s1c) - (y^2/(s2t*s2c)) + x*(s1c + s1t)/(s1t*s1c) + y*(s2c + s2t)/(s2t*s2c) == 1}, {x, -70 Pi, 70 Pi}, {y, -30 Pi, 30 Pi}, Axes -> {True, True}, FrameLabel -> {\[Sigma]1, \[Sigma]2}, PlotLabel -> "failure surface", ContourStyle -> Table[Hue[i], {i, 0, 1, 0.1}], FrameTicks -> {Table[{x, x}, {x, -70 \[Pi], 70 \[Pi], 20 \[Pi]}], Table[{x, x}, {x, -30 \[Pi], 30 \[Pi], 10 \[Pi]}], Automatic, Automatic}, PlotRange -> {{-80 \[Pi], 80 \[Pi]}, {-40 \[Pi], 40 \[Pi]}}, PlotLegends -> SwatchLegend["Expressions", LegendMarkers -> markers, LegendMarkerSize -> {40, 20}]] yehuda