經過一番折騰,發現最好的方法還是自定義刻度線,而且這也是最自由的方法了,而且實現起來還不復雜
查找替換的方法試過了 出圖也不滿意
原代碼:
ListLinePlot[data,
PlotStyle -> Directive[Black, Thin],
MeshStyle -> Black, PlotMarkers -> "\[FilledDiamond]",
Frame -> {{True, False}, {True, False}},
FrameLabel -> {s@"Temperature T/\[Degree]C", s@"Pressure P/MPa"},
FrameTicksStyle ->
Directive[FontFamily -> "Times New Roman", 12, Black],
FrameStyle -> AbsoluteThickness[1]] /.
s[t_] :> Style[t, FontFamily -> "Times New Roman", 12, Black, Italic]
最終代碼
ListLinePlot[data,
PlotStyle -> Directive[Black, [email protected]],
MeshStyle -> Black, PlotMarkers -> Style["\[FilledDiamond]", 8],
Frame -> {{True, False}, {True, False}},
FrameTicks -> {Table[
If[Mod[i, 5] == 0, {i, i, {0.02, 0}}, {i, "", {0.01, 0}}], {i, 0, 25}],
Table[
If[Mod[i, 5] == 0, {i, i, {0.02, 0}}, {i, "", {0.01, 0}}], {i, 0, 35}]},
FrameLabel -> {s@"Temperature T/\[Degree]C", s@"Pressure P/MPa"},
FrameTicksStyle ->
Directive[FontFamily -> "Times New Roman", 12, Black]] /.
s[t_] :> Style[t, FontFamily -> "Times New Roman", 12, Black, Italic]
導出圖片的代碼,注意最後的ImageResolution -> 300
Export["1.png",圖片 , ImageResolution -> 300]
最終得到的圖片