I'm not sure what you mean by it being discontinuous. It doesn't look discontinuous either in a Plot3D
or in a Plot
holding one variable constant. In fact if you look at the function, at the point that it switches definition, several terms converge to zero no matter which function is being used. So it is actually effectively continuous even if it it isn't continuously differentiable. (It would have helped to remove the Abs[s1c]
complication for s1c
and s2c
and simply used positive variables instead. They don't appear outside Abs
expressions.)
For your second plot, you need the ContourStyle
option to style the contours, unsurprisingly enough. You also have several undefined variables, including s45
, which I've set to be 50 in the following. There is also a capital S
. Please be aware that it is not good practice to name variables with single capital letters as it might clash with a built-in function.
Adding a legend, if that's really what you meant, is quite straightforward in version 9: add the following option to the end of the contour plot and you get the following:
PlotLegends -> Placed[LineLegend[Automatic,
{"something", "something else"}], Bottom]