1
$\begingroup$

I've got the following script:

ClearAll[Evaluate[Context[] <> "*"]];

h[x_, n_] := (x - 1/\[Theta])/(1 + \[Theta])^n + 1/\[Theta];
trap[m_, n_] := Clip[{
    {If[n == 0, 0, h[a, m - n]], h[a, m]}, {h[a, m - n - 1], 
     h[a, m]},
    {h[a, m - n], h[a, m + 1]}, {If[n == 0, 0, h[a, m - n + 1]], 
     h[a, m + 1]}
    }, {0, a}];

isinty[y_, n_] := h[a, n + 1] <= y <= h[a, n];
isintx[x_, y_, n_] := 0 <= x <= g[y, n];

labela = ToString[Subscript[h, 0], StandardForm] <> "(A)=A ";
labela = "A";
gr := Append[Append[Table[h[a, n], {n, 0, nmax}], 0], 1/\[Theta]];
grlabels :=
  Append[
   Append[
    Append[
     Prepend[
      Table[{h[a, n], 
        Style[ToString[Subscript[h, n], StandardForm] <> "(A) ", 
         Black]}, {n, 1, nmaxlabels}], {a, Style[labela, Black]}],
     {0, Style["0", Black]}],
    {1/\[Theta], 
     Style["\!\(\*FractionBox[\(1\), \(\[Theta]\)]\)", Black]}],
   {h[a, 5], Style["...", Black]}];

line := Plot[x, {x, 0, a},
   PlotRange -> {{0, a}, {0, a}},
   PlotStyle -> {Gray, Thin, Dotted}];


arrx := Graphics[{Arrowheads[0.05], Arrow[{{0, 0}, {0, a}}]}];
arry := Graphics[{Arrowheads[0.05], Arrow[{{0, 0}, {a, 0}}]}];


\[Theta] = 7/10;
a = 20;
nmax = 5;
nmaxlabels = 3;
trapindex = <|row -> 3, column -> 1|>;
isbw = True;

Show[Flatten[{line, arrx, arry}],
 GridLinesStyle -> Directive[Gray, Dashed],
 PlotRangeClipping -> False,
 Frame -> True,
 FrameStyle -> 
  Directive[LineColor -> Transparent, FontFamily -> "Courier", 
   FontSize -> 15.0],
 FrameLabel -> {Style["x", Black], Style["y", Black]},
 FrameTicks -> {grlabels, grlabels},
 AspectRatio -> 1,
 ImageSize -> {800, 800}]

It produces the following figure: Output

I would like to rotate by 90 degrees the three dots appearing right above the label $1/\theta$ on the $y$-axis, and do the same for the second $y$-axis which is on the right of the plot.

How do I do this rotation?

Thanks in advance.

$\endgroup$
4
  • 4
    $\begingroup$ FrameTicks -> {grlabels, grlabels /. "..." :> Rotate["...", Pi/2]} $\endgroup$
    – Bob Hanlon
    Commented Mar 17, 2015 at 19:43
  • 1
    $\begingroup$ Rotate[Text[Style["...", Black]], \[Pi]/2] By the way, this problem could have been posed with one line of code (30 characters or so). $\endgroup$ Commented Mar 17, 2015 at 19:46
  • $\begingroup$ @BobHanlon Thanks, that's good enough. $\endgroup$
    – Alex
    Commented Mar 17, 2015 at 20:04
  • $\begingroup$ @DavidG.Stork Thanks. I agree I should have trimmed the code a bit. $\endgroup$
    – Alex
    Commented Mar 17, 2015 at 20:05

1 Answer 1

2
$\begingroup$

For use as tick labels, it may be more compact to use special characters:

Style["\[CenterEllipsis]", Black]

$\cdots$

Style["\[VerticalEllipsis]", Black]

$\vdots$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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