0

I would like to have a custom ticks on x-axis on my ListPlot, but nothing is showing, what am I doing wrong?

data = {{1, 2}, {2, -2}, {3, -1}, {4, 0}, {5, -3},
 {6, -2}, {7, -1}, {8, -1}, {9, -1}, {10, 0}};

ListPlot[data, 
 FrameTicks -> {{"ττ", "τr", "τθ", 
    "\τφ", "rr", "rθ", "rφ", 
    "θθ", "θφ", 
    "φφ"}, {-5, 5}}, Frame -> True, 
 PlotMarkers -> {Automatic, Medium}, Axes -> False,ImageSize -> 500]

And I get

enter image description here

dingo_d
  • 677
  • 8
  • 14
  • Why do you think this will work. Have you looked at FrameTicks and Ticks documentation? Especially Details section is going to be helpful. – Kuba Sep 23 '13 at 14:04
  • So I cannot put any custom ticks in Mathematica? Well that sucks :( – dingo_d Sep 23 '13 at 14:12
  • @dingo_d Of course you can; Kuba is saying that you don't have the correct syntax. Please see the answer to the question I just closed this as a duplicate of. Also re-read the documentation for Ticks and FrameTicks. – Mr.Wizard Sep 23 '13 at 14:14
  • I had an answer with you that solved this particular problem but the duplicate will do just as well. Here's a start: labels = {"\[Tau]\[Tau]", "\[Tau]r", "\[Tau]\[Theta]", "\[Tau]\[CurlyPhi]", "rr", "r\[Theta]", "r\[CurlyPhi]", "\[Theta]\[Theta]", "\[Theta]\[CurlyPhi]", "\[CurlyPhi]\[CurlyPhi]"}; ticks = Table[x, {x, 0, 9}]; frameticks = Transpose[{ticks, labels}] then set the option FrameTicks -> {{False, False}, {frameticks, False}} – C. E. Sep 23 '13 at 14:15
  • Oh, it can :D Thanks. I read Details section, but found nothing that could help :\ – dingo_d Sep 23 '13 at 14:18
  • data = {{1, 2}, {2, -2}, {3, -1}, {4, 0}, {5, -3}, {6, -2}, {7, -1}, {8, -1}, {9, -1}, {10, 0}};
    ListPlot[data,
     FrameTicks -> {{Range[-3, 2], Range[-3, 2]},
                    {Partition[Riffle[Range@10, {"ττ", "τr", "τθ", "τφ", "rr", "rθ", "rφ", "θθ", "θφ", "φφ"}], 2], None}}, Frame -> True, 
            PlotMarkers -> {Automatic, Medium}, Axes -> False, ImageSize -> 500]
    
    – Dr. belisarius Sep 23 '13 at 14:18
  • 1
    @dingo_d In FramTicks details: "For each edge, tick marks can be specified as described in the notes for Ticks.". And as it is written, in Ticks documentation there are examples how the proper syntax with labels looks. – Kuba Sep 23 '13 at 14:21
  • Sorry, didn't look carefully :\ – dingo_d Sep 23 '13 at 14:21

0 Answers0