Mathematica有十个基本的绘图标记,在制作时可以循环ListPlot使用PlotMarkers->Automatic.有圆形,方形,菱形,上三角形和下三角形的填充和空白版本.第十一个标记重复填充圆圈,但颜色不同.例如,
ListPlot[Table[{i, i + #}, {i, 1, 7}] & /@ {0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11}, PlotMarkers -> Automatic]
给

是否可以从这组默认标记中指定特定的绘图标记?在FullForm上述情节表明,数学使用字体的那些符号,即
Style["\[FilledCircle]", Rule[FontSize, 8.96]]`
哪一个可以手动设置,但我想知道是否有一种方法可以使用的方式,使用默认的绘图颜色 ColorData[1][n],n第n种颜色.
我修改了我的笔记本的样式表,以包含一个StyleData["Todo"]继承自的样式表StyleData["Item"].它将单元格dingbat更改为复选框.在样式表编辑器中:
Cell[StyleData["ToDo", StyleDefinitions -> StyleData["Item"]],
CellDingbat->DynamicModuleBox[{$CellContext`color$$},
CheckboxBox[
Dynamic[$CellContext`color$$], {RGBColor[1, 0.5, 0],RGBColor[0,Rational[2, 3], 0]},
Background -> Dynamic[$CellContext`color$$]],
DynamicModuleValues :> {}
],
]
Run Code Online (Sandbox Code Playgroud)
问题是,当在笔记本中使用时,复选框的状态不会保存在Mathematica会话之间.我以为DynamicModule[]会做到这一点.如何让复选框记住其状态?
编辑
Simon的解决方案确实保存了复选框的状态,但是当用作CellDingbat(MacOS X)时,复选框会被剪切.将Simon的代码放在CellFrameLabels选项中可以解决问题,并保留默认的"Item"CellDingbat.这就是我的用处:
Cell[StyleData["ToDo", StyleDefinitions -> StyleData["Item"]],
CellFrameLabels->{{
ButtonBox[
CheckboxBox[False], ButtonFunction :> (SelectionMove[
ButtonNotebook[], All, ButtonCell];
With[{$CellContext`new = ReplaceAll[
Options[
NotebookSelection[
ButtonNotebook[]], CellFrameLabels], CheckboxBox[
Pattern[$CellContext`x,
Alternatives[True, False]]] :> CheckboxBox[
Not[$CellContext`x]]]},
SetOptions[
NotebookSelection[
ButtonNotebook[]], $CellContext`new]]; SelectionMove[
ButtonNotebook[], After, CellContents]), Appearance -> None,
Method -> "Preemptive", Evaluator -> Automatic], None}, {
None, None}},
MenuSortingValue->1621]
Run Code Online (Sandbox Code Playgroud) 我试图计算一个BezierFunction[]x分量的倒数,例如,定义为
fx[u_] := BezierFunction[{{0, 0}, {1/8, 3/4}, {1, 1}}][u][[1]]
Run Code Online (Sandbox Code Playgroud)
这是下图中的蓝色曲线:

该曲线明显具有0≤u≤1的唯一倒数,例如,通过在坐标处相交的红色虚线所示{0.4,fx[0.4]} == {0.4, 0.22}.
In[1]:= fx[0.4]
Out[1]:= 0.22
In[2]:= fx[0.4] == 0.22
Out[2]:= True
Run Code Online (Sandbox Code Playgroud)
所以我对以下内容感到惊讶:
In[3]:= FindRoot[fx[u] == 0.22, {u,0.4}]
Out[3]:= {u->0.22}
Run Code Online (Sandbox Code Playgroud)
和
In[4]:= InverseFunction[fx][0.22]
Out[4]:= 0.22
Run Code Online (Sandbox Code Playgroud)
我什么也没找到相应文件,相互作用InverseFunction与BezierFunction,或Part.有人知道提取BezierFunction的x分量的逆的方法吗?