I want to get a high-resolution figure using Mathmatica. However, the FrameTicks are too short, and thus I installed the CustomTicks package. With its help, I can plot good ticks. However now a new problem has arisen. I do not know how to edit the tick labels using my expected text. An example code to show my problem:
Plot[Sin[x], {x, 0, 6 Pi}, Axes -> False, Frame -> True,
FrameTicks -> {{LinTicks[{-1, 0, 1}, {-0.5, 0.5},
ShowMinorTickLabels -> True, DecimalDigits -> 0],
None}, {LinTicks[0, 15, 3, 2], None}},
FrameTicksStyle -> {{Directive[Black, 16, Plain],
None}, {Directive[Black, 16, Plain], None}}]
I got this figure:
However, what I expected is to plot the y axis as [-1, -0.5, 0, 0.5, 1].
If I change the DecimalDigits -> 1
to be DecimalDigits -> 0
, I got:
My ideas:
(1) If I can define the DecimalDigits
for MajorTicks and MinorTicks respectively, I should be able to solve this problem.
(2) If I can instead the tick values using string text, I can also solve this. For this solution, I know how to do this using FrameTicks
, but I need to use the CustomTicks package because I want to plot ticks in proper length, thickness and color.
I learned the CustomTicks manual and have tried many times. I still can not solve this problem up to now.
Do you have some ideas to solve this problem? Thank you!