公告:本站正式转型为非交互式静态网站!
转型:本站将通过笔记和博客的形式继续为大家服务,关于 Mathematica 问答服务请移步至QQ群:365716997
联系:如有问题请联系QQ群管理员,或发送邮件至:lixuan.xyz@qq.com。
感谢:最后非常感谢大家多年来的支持与帮助!
参考《互联网跟帖评论服务管理规定》《中华人民共和国网络安全法》《网络信息内容生态治理规定》《互联网用户账号信息管理规定》

—— 2022-11-27

欢迎来到 Mathematica 问答社区

提问时请贴上文本代码

语法高亮:在编辑器中点击

被禁止的话题:广告破解

请阅读:《提问的智慧》

备用域名:mma.ooo

支持LaTex数学公式
行内公式标识符:\$ 或“$\backslash ($”+“$\backslash )$”,
行间公式标识符:\$\$ 或 “$\backslash [$”+“$\backslash ]$”

社区建议QQ群:365716997

分类

0 投票
665 浏览
ClearAll["`*"]
SetDirectory[NotebookDirectory[]];
m1 = ParametricPlot[{-v Cos[u], v Sin[u]}, {u, 0, 2 Pi}, {v, 1.5, 
    1.7}, Mesh -> None, Frame -> False, 
   ColorFunction -> 
    Function[{u, v}, ColorData["LightTemperatureMap"][v]], 
   BoundaryStyle -> None, Axes -> False, Background -> White, 
   PlotLegends -> 
    Placed[BarLegend[Automatic, LegendMarkerSize -> {20, 200}, 
      LegendLabel -> "\[CapitalDelta](\[Theta])", 
      LabelStyle -> 
       Directive[Black, FontSize -> 24, 
        FontFamily -> "Times New Roman"]], {After, Center}]];
axes = Graphics[{Arrow[{{{0, 0}, {0, 2}}, {{0, 0}, {2, 0}}}], {Dashed,
      Arrow[{{0, 0}, {Sqrt[2], Sqrt[2]}}]}, 
    Text[Style["\[Theta]", FontFamily -> "Times New Roman", 24], {0.8,
       0.4}], Text[
     Style["\!\(\*SubscriptBox[\(k\), \(x\)]\)", 
      FontFamily -> "Times New Roman", 24], {2.3, 0}], 
    Text[Style["\!\(\*SubscriptBox[\(k\), \(y\)]\)", 
      FontFamily -> "Times New Roman", 24], {0, 2.3}], 
    Text[Style["\!\(\*FractionBox[\(\[Pi]\), \(2\)]\)", 
      FontFamily -> "Times New Roman", 24], {-0.3, 1.4}], 
    Text[Style["-\!\(\*FractionBox[\(\[Pi]\), \(2\)]\)", 
      FontFamily -> "Times New Roman", 24], {-0., -1.2}]}];
ang = ParametricPlot[0.6 {Sin[x], Cos[x]}, {x, Pi/4, Pi/2}, 
   PlotStyle -> Directive[Dashed, Thickness[0.008], Red]];
p1 = Show[m1, axes, ang, PlotRange -> All]
Export["mass2.png", p1, ImageResolution -> 200];

为什么这里的图例始终不显示,该怎么解决?

 

这个问题被我自己解决了--------------------

ClearAll["`*"]
SetDirectory[NotebookDirectory[]];
bar = Module[{dx, zColor}, dx = 0.1;
   zColor = Flatten[Table[i/10, {i, 0, 10, dx}], 1]; 
   BarLegend[{Blend[{Darker@Blue, White, Red}, #] & /@ zColor, {-1, 
      1}}, LegendMarkerSize -> 300, 
    LegendLabel -> "\[CapitalDelta](\[Theta])", 
    LabelStyle -> {FontSize -> 20, 
      FontFamily -> "Times New Roman"}]];
m1 = ParametricPlot[{-v Cos[u], v Sin[u]}, {u, 0, 2 Pi}, {v, 1.5, 
    1.7}, Mesh -> None, Frame -> False, 
   ColorFunction -> (Blend[{Darker@Blue, White, Red}, #1] &), 
   BoundaryStyle -> None, Axes -> False, Background -> White, 
   PlotLegends -> bar];
axes = Graphics[{Arrow[{{{0, 0}, {0, 2}}, {{0, 0}, {2, 0}}}], {Dashed,
      Arrow[{{0, 0}, {Sqrt[2], Sqrt[2]}}]}, 
    Text[Style["\[Theta]", FontFamily -> "Times New Roman", 24], {0.8,
       0.4}], Text[
     Style["\!\(\*SubscriptBox[\(k\), \(x\)]\)", 
      FontFamily -> "Times New Roman", 24], {2.3, 0}], 
    Text[Style["\!\(\*SubscriptBox[\(k\), \(y\)]\)", 
      FontFamily -> "Times New Roman", 24], {0, 2.3}], 
    Text[Style["\!\(\*FractionBox[\(\[Pi]\), \(2\)]\)", 
      FontFamily -> "Times New Roman", 24], {-0.3, 1.4}], 
    Text[Style["-\!\(\*FractionBox[\(\[Pi]\), \(2\)]\)", 
      FontFamily -> "Times New Roman", 24], {-0., -1.2}]}];
ang = ParametricPlot[0.6 {Sin[x], Cos[x]}, {x, Pi/4, Pi/2}, 
   PlotStyle -> Directive[Dashed, Thickness[0.008], Blue]];
p1 = Show[m1, axes, ang, PlotRange -> All]

问题关闭原因: 该问题已经被解决
用户: 落雨流觞 (1.1k 分)
已关闭 用户:落雨流觞
...