1
$\begingroup$

How can I change my FrameTicks in this way?

enter image description here

My code is this:

f[x_, ITERATIONS_] := Sum[j*Exp[x*j], {j, 1, ITERATIONS}]/
  Sum[Exp[x*j], {j, 1, ITERATIONS}];
Plot[
 {Legended[Style[f[x, 10], Black, Thin], 
   Placed[Style["\[LeftAngleBracket]j\[RightAngleBracket]", 
     FontSize -> 24], Top]], Style[10, Dashed, Gray]},
 {x, 0, 50},
 PlotTheme -> "Scientific",
 FrameStyle -> Directive[ FontSize -> 18, Black],
 ImageSize -> Large,
 AspectRatio -> 1/2,
 FrameLabel -> {Style["x (= \[CurlyEpsilon] / k_BT)", Black, 
    FontSize -> 18], 
   Style["\[LeftAngleBracket]j\[RightAngleBracket]", Black, 
    FontSize -> 18]},
 PlotRange -> {{-0.1, 3}, {5, 10.5}},
 FrameTicks -> {{ {(10 + 1)/2, 10}, None},  {{0}, None}}
 ]

And the result is

enter image description here

$\endgroup$
3
$\begingroup$

Use

FrameTicks -> {{{{(10 + 1)/2, HoldForm[(N + 1)/2]}, {10, N}}, None}, {{0}, None}}

to get

enter image description here

or

FrameTicks -> {{{{(10 + 1)/2, Style[(N + 1)/2, SingleLetterItalics -> False]}, 
  {10, Style[N, SingleLetterItalics -> False]}}, None}, {{0}, None}}

to get

enter image description here

You can find various forms to specify tick marks in Ticks >> Details:

enter image description here

$\endgroup$
2
  • $\begingroup$ Where can I found more information about FrameTicks arguments? $\endgroup$ Nov 3 '20 at 21:01
  • 1
    $\begingroup$ @tajiri_numero_1, updated with a link to the documentation page. $\endgroup$
    – kglr
    Nov 3 '20 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.