Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Different text style for labels and ticks

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66733] RE: [mg66686] Different text style for labels and ticks
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 27 May 2006 21:04:10 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Janos,

You could use StyleForm["label", options] for the PlotLabel to obtain the
font you want there.

Similarly, you could write your own Ticks or FrameTicks specification using
StyleForm for the actual labels.

The only trouble with writing your own Ticks specification is that it is a
bit of a chore to get both the labeled and unlabeled ticks and get to get
the completely unlabeled ticks on the opposite side of the frame. With
DrawGraphics you could use the CustomTicks command along with the
CTNumberFunction option to control the formatting and style of tick labels.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: János [mailto:janos.lobb at yale.edu]
To: mathgroup at smc.vnet.net


Hi,

I am wondering if it is possible to specify a different text style in
a (Multiple)ListPlot for PlotLabel and Ticks.  If I just use it like:

TextStyle -> {FontFamily -> "Times", FontSize -> 14},

it affects all texts in the plot including PlotLabel, AxesLabel and
Ticks.  I would like Ticks to have a different TextStyle - need
smaller characters there -, and PlotLabel to have bigger text, even
bold.

I tried Epilog - hoping that I can draw the PlotLabel after the plot
is done - with no success.

Thanks ahead,

János
P.S.   Here is one statement for illustration:

In[114]:=
cgAll = MultipleListPlot[
     Take[cg0254,
      -Length[cg0254]],
     Take[cg0033,
      -Length[cg0033]],
     AxesLabel -> {"Datetime",
       "% of \ncongestion"},
     PlotJoined -> {True,
       True}, SymbolShape ->
      {PlotSymbol[Diamond],
       PlotSymbol[Star]},
     SymbolStyle ->
      {RGBColor[1, 0, 0],
       RGBColor[0, 0, 1]},
     PlotLegend ->
      {"10.84.2.254->10.32.1.3\
3",
       "10.32.1.33->10.32.1.82"}\
, AxesOrigin ->
      {First[First[Take[
          cg0254, -Length[
           cg0254]]]], 0},
     PlotRegion -> {{0, 1},
       {0, 1}},
     LegendPosition ->
      {-0.88, -0.75},
     LegendOrientation ->
      Horizontal,
     LegendSize -> {1, 0.1},
     TextStyle ->
      {FontFamily -> "Times",
       FontSize -> 14},
     PlotLabel -> "Congestion \
between\n 10.84.2.254 -> \
10.32.1.33\n and\n 10.32.1.33 \
-> 10.32.1.82\n all data",
     Ticks ->
      {({#1, StringJoin[
           ToString[
           ToDate[#1][[2]]],
           "/", ToString[
           ToDate[#1][[3]]],
           "\n", ToString[
           ToDate[#1][[4]]],
           ":", ToString[
           ToDate[#1][[
           5]]]]} & ) /@
        Take[cg0254[[All,1]],
         {1, Length[cg0254[[
           All,1]]], Floor[
           Length[cg0254[[All,
           1]]]/14]}],
       Automatic}];



  • Prev by Date: Re: M100: An Introduction To Mathematica
  • Next by Date: Re: How to make results from Integrate and NIntegrate agree
  • Previous by thread: Different text style for labels and ticks
  • Next by thread: Re: Different text style for labels and ticks