如何让PlotLegend在Mathematica中使用ParametricPlot?

nos*_*nos 4 plot wolfram-mathematica

看来我不能用PlotLegendParametricPlot.这是我试过的:

ParametricPlot[{Sin[t], Cos[Sqrt[t]]}, {t, 0, 2 Pi}, 
 PlotLegend -> {"My Plot"}] 
Run Code Online (Sandbox Code Playgroud)

Ver*_*eia 5

如果您PlotLegends首先调用该包,它应该可以工作,尽管您可能更好地使用该ShowLegends版本而不是该PlotLegend选项,以获得更多控制:

Needs["PlotLegends`"]

ParametricPlot[{Sin[t], Cos[Sqrt[t]]}, {t, 0, 2 Pi}, 
 PlotLegend -> {"My Plot"}]
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

ShowLegend[
 ParametricPlot[{Sin[t], Cos[Sqrt[t]]}, {t, 0, 
   2 Pi}], {{{Graphics[{Blue, Disk[{0, 0}, 1]}], {Sin[t], 
     Cos[Sqrt[t]]}}}}]
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述