Wolfram mathematica 为Mathematica中的所有二维打印启用帧
为了将所有2D绘图设置为具有选项Frame->True,我在init.m中添加了以下内容:Wolfram mathematica 为Mathematica中的所有二维打印启用帧,wolfram-mathematica,Wolfram Mathematica,为了将所有2D绘图设置为具有选项Frame->True,我在init.m中添加了以下内容: (SetOptions[#, Frame -> True]&)/@{Plot,ListPlot,ListLinePlot,LogPlot,LogLogPlot,LogLinearPlot}; 这看起来很尴尬,而且我从来没有列出所有不同的情节 是否有一种更简单/更好的方法让我集体设置这些选项 谢谢大家! 这将查找每个名称中包含Plot和Frame选项的内置项: 如果要扩展到名称中没有“绘图”
(SetOptions[#, Frame -> True]&)/@{Plot,ListPlot,ListLinePlot,LogPlot,LogLogPlot,LogLinearPlot};
这看起来很尴尬,而且我从来没有列出所有不同的情节
是否有一种更简单/更好的方法让我集体设置这些选项
谢谢大家! 这将查找每个名称中包含Plot和Frame选项的内置项: 如果要扩展到名称中没有“绘图”的对象,则需要使用“安静”,因为当您请求选项时,少数符号会发出警告:
Select[Symbol /@ Names["System`*"] ,
MemberQ[Quiet@Options[#] , Frame -> _] & ]
公平的警告我不知道更改所有这些东西的默认值会带来什么后果。谢谢!这个答案也教了我一些关于这个系统的知识!谢谢 {ArrayPlot, BodePlot, CommunityGraphPlot, ContourPlot, \ DateListLogPlot, DateListPlot, DensityPlot, DiscretePlot, GraphPlot, \ LayeredGraphPlot, LineIntegralConvolutionPlot, ListContourPlot, \ ListCurvePathPlot, ListDensityPlot, ListLineIntegralConvolutionPlot, \ ListLinePlot, ListLogLinearPlot, ListLogLogPlot, ListLogPlot, \ ListPlot, ListPolarPlot, ListStreamDensityPlot, ListStreamPlot, \ ListVectorDensityPlot, ListVectorPlot, LogLinearPlot, LogLogPlot, \ LogPlot, MatrixPlot, NicholsPlot, NyquistPlot, ParametricPlot, Plot, \ PolarPlot, ProbabilityPlot, ProbabilityScalePlot, QuantilePlot, \ RegionPlot, ReliefPlot, RootLocusPlot, SingularValuePlot, \ StreamDensityPlot, StreamPlot, TreePlot, VectorDensityPlot, \ VectorPlot, WaveletListPlot, WaveletMatrixPlot}
SetOptions[#, Frame -> True]&/@Select[Symbol /@ Names["System`*Plot*"],
MemberQ[Options[#] , Frame -> _] & ];
Select[Symbol /@ Names["System`*"] ,
MemberQ[Quiet@Options[#] , Frame -> _] & ]