# Legend Missing In The Plot

I tried to save the plot P1 by right clicking on the plot and pressing save as. I found that the PlotLegend is not saved. Please help.

 P1 = Plot[{Sin[ t], Cos[ t], Tan[ t]}, {t, 0, 10},
PlotStyle -> {{Blue, Dashing[None], Thickness[0.005]}, {Red,
Dashing[Tiny], Thickness[0.005]}, {Green, Dashing[Small],
Thickness[0.005]}}, Axes -> False, Frame -> True,
PlotLegends ->
Placed[LineLegend[Automatic, {"sin", "cos", "tan for b=1"},
LegendMarkerSize -> {{20, 10}}], Top]]

• See the documentation for ParametricNDSolve. Commented May 27, 2017 at 15:48

A density plot can be obtained by deleting PC = 20.0 from the first line of code and replacing NDSolve by

solPC = ParametricNDSolve[
Join[system, initialvalues], {Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8, Y9,
Y10, Y11, Y12, Y13, Y14, Y15, Y16, Y17, Y18, Y19, Y20, Y21, Y22,
Y23, Y24, Y25, Y26, Y27}, {t, 0, 15}, {PC}, MaxSteps -> Infinity];


Re[Y7} then can be plotted for larger values of PC by

Plot[Evaluate[Table[Re[(Y7 /. solPC)[pc][t]], {pc, 16, 20}]], {t, 0, 15},
AxesLabel -> {"t", "Y7"}]


The corresponding density plot is

Table[Evaluate[Re[( Y7 /. solPC)[pc][t]]], {pc, 16, 20, .5}, {t, 0, 15, .25}];
ListDensityPlot[%, DataRange -> {{0, 15}, {16, 20}}, ColorFunction -> "Rainbow"]


For smaller values of PC, the numerical integration becomes unstable. Probably, this latter problem can be resolved by proper choices for ParametricNDSolve options.