将mathematica绘图符号添加到乳胶图形图例中

时间:2015-08-20 10:22:56

标签: latex wolfram-mathematica

我有一张使用此代码在Mathematica中绘制的图表:

ListPlot[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, 
 PlotMarkers -> {Automatic, Large}, PlotTheme -> "Default"]

我已导出图形,我想将图中的符号添加到LaTeX中的图形图例中。我知道乳胶已经有\blacksquare,它相当于Mathematica中的\[FilledSquare],但我希望所有形状都与图形中的颜色完全相同

2 个答案:

答案 0 :(得分:1)

使用Style指定颜色和尺寸。

ListPlot[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}},
 PlotMarkers -> {
   Style["\[FilledSquare]", Red, 20],
   Style["\[FilledSquare]", Blue, 20],
   Style["\[FilledSquare]", Green, 20]},
 PlotTheme -> "Default"]

答案 1 :(得分:0)

我想你想提取标记作为单独的图形使用?试试这个:

ListPlot[...]//Fullform

你会得到一堆代码,例如:

Directive[RGBColor[0.2472, 0.24, 0.6]], Inset[
   Style["\[FilledCircle]", Rule[FontSize, Large]], 10],

代表个别标记。

经过一些操作后,您可以像这样导出它们:

Export["test.eps",  (* or tiff or whatever.. *)
    Style["\[FilledCircle]", RGBColor[0.2472, 0.24, 0.6],
         Rule[FontSize, Large]]]

最终这些东西都是字体字形,因此您也可以直接在乳胶中使用mathematica字体。