5
$\begingroup$

Where am I going wrong with the following syntax?

TimelinePlot[
    {Labeled[DateInterval[{{2020, 9, 1}, Today}],
    "Blah", Bottom, RotateLabel -> True]},
PlotLayout -> "Vertical"]

If TimelinePlot and RotateLabel are incompatible, is there a neat workaround?

$\endgroup$
1
  • $\begingroup$ Does Rotate["Blah", -Pi/2] instead of "Blah" solve your problem? $\endgroup$
    – Ben Izd
    Jan 15, 2022 at 10:10

2 Answers 2

5
$\begingroup$
Manipulate[
 Labeled[ (*has three parts: expr, lbl, pos *)
  TimelinePlot[
   DateInterval[{{2020, 9, 1}, Today}]
   , PlotLayout -> "Vertical"
   , ImageSize -> Small
   , DateTicksFormat -> {
     "MonthNameShort"
     , " "
     , "YearShort"
     }
   ] (*expr*)
  , Framed[
   Rotate["Blah", ang]
   , Background -> LightBlue
   ] (*lbl*)
  , pos (*pos*)
  ]
 , {{pos, Right, "Position"}, {Right, Left, Top, Bottom}}
 , {{ang, 0, "Rotation"}, {0, \[Pi]/2, \[Pi], -\[Pi]/2}}
 ]

enter image description here

$\endgroup$
0
3
$\begingroup$

Alternatively, use the option PlotLegends

TimelinePlot[{DateInterval[{{2020, 9, 1}, Today}]},
 PlotLayout -> "Vertical",
 ImageSize -> Small,
 PlotLegends -> Placed["Blah", Below]]

enter image description here

$\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.