Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15348 > unrolled thread

Re: Rotate Dateticks in DateListPlot

Started byBob Hanlon <hanlonr357@gmail.com>
First post2013-08-23 09:27 +0000
Last post2013-08-23 09:27 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Rotate Dateticks in DateListPlot Bob Hanlon <hanlonr357@gmail.com> - 2013-08-23 09:27 +0000

#15348 — Re: Rotate Dateticks in DateListPlot

FromBob Hanlon <hanlonr357@gmail.com>
Date2013-08-23 09:27 +0000
SubjectRe: Rotate Dateticks in DateListPlot
Message-ID<kv79un$bu1$1@smc.vnet.net>
data = {{{2006, 10, 1}, 10}, {{2006, 10, 15}, 12},
   {{2006, 10, 30}, 15}, {{2006, 11, 20}, 20}};


dlp = DateListPlot[data,
  Epilog -> (Text[
       ToString[{#[[1, 3]], #[[2]]}],
       #, 5/4*Sign[DateDifference[
           {2006, 11, 1}, #[[1]]]*
          {1, 1}]] & /@ data)]


Rotate all strings:


Show[dlp /. str_String :>
   Rotate[str, 90 Degree]]


Rotate just Frame date labels:


Show[dlp /. {v_, str_String} :>
   {v, Rotate[str, 90 Degree]}]



Bob Hanlon




On Thu, Aug 22, 2013 at 12:52 AM, Gregory Lypny
<gregory.lypny@videotron.ca>wrote:

> Hi everyone,
>
> Bob Hanlon posted a neat way of rotating the frame ticks (date markers) on
> a date list plot.
>
> data = {{{2006, 10, 1}, 10}, {{2006, 10, 15}, 12}, {{2006, 10, 30},
>     15}, {{2006, 11, 20}, 20}};
>
> Show[DateListPlot[data] /.
>   str_String :> Rotate[str, 90 Degree]]
>
> It works like a charm as long as their are no other string annotations in
> the plot; otherwise, those other annotations will be rotated too.  Is there
> a way to rotate only the frame ticks?
>
> Regards,
>
> Gregory
>
>
>
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web