MathGroup Archive 1997

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

Search the Archive

Re: computer modern plot tick labels

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9846] Re: computer modern plot tick labels
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Fri, 28 Nov 1997 05:36:00 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

--------------4DFC6969487D

Art:
Attached is a notebook with some techniques for doing the sort of things
that you want.
The arrows on the axis may need some adjustment We can automate
everything, but it would need more work -- please mail me if you nees
more.
-- 
Allan Hayes
Mathematica Training and Consulting
Leicester, UK
hay at haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 4198

--------------4DFC6969487D
Content-Description: Mathematica 3.0 Document

(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 3.0,
MathReader 3.0, or any compatible application. The data for the
notebook  starts with the line of stars above.

To get the notebook into a Mathematica-compatible application, do one of
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be sent
directly in email or through ftp in text mode.  Newlines can be CR, LF
or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info at wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from  Wolfram
Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      4941,        139]*)
(*NotebookOutlinePosition[      5804,        167]*) (* 
CellTagsIndexPosition[      5760,        163]*) (*WindowFrame->Normal*)


Notebook[{

Cell[CellGroupData[{
Cell["Text in graphics, arrows on axes", "Subtitle"],

Cell[BoxData[
    \(<< Graphics`Arrow`\)], "Input"],

Cell[BoxData[
    \(\(Plot[x, \ {x, 0, 3}, \n\t
      PlotLabel\  -> \ \*"\"\<label \!\(x\_1\), \[Alpha]/\[Beta]\>\"",
\n\t
      Ticks\  -> \ \n
        \ \ \ \t{{\ {1, \ x\_1}, {2, \ \[Alpha]\/\[Beta]}},
\tAutomatic}, \n
      \t\t\tTextStyle\  -> 
        \ {FontFamily -> "\<Times\>", \ FontSize\  -> \ 24}, \n\t\t\ 
      FormatType -> \ TraditionalForm, \n\t\t\t
      Epilog\  -> 
        \ {Arrow[{3, \ 0}, {3.1, 0}, \n\t\t\tHeadCenter\  -> 0, \ 
            HeadWidth\  -> \  .8]}\n]; \)\)], "Input"],

Cell["\<\
NOTE: unfortunately, we can't get the same style as Text cells \ simply
by\
\>", "Text"],

Cell[BoxData[
    \(\(Plot[x, \ {x, 0, 3}, \n\t
      PlotLabel\  -> \ \*"\"\<label \!\(x\_1\), \[Alpha]/\[Beta]\>\"",
\n\t
      Ticks\  -> \ \n
        \ \ \ \t{{\ {1, \ x\_1}, {2, \ \[Alpha]\/\[Beta]}},
\tAutomatic}, \n
      \t\t\tTextStyle\  -> \ "\<Text\>", \n\t\t\t
      Epilog\  -> 
        \ {Arrow[{3, \ 0}, {3.1, 0}, \n\t\t\tHeadCenter\  -> 0, \ 
            HeadWidth\  -> \  .8]}\n]; \)\)], "Input"],

Cell["\<\
The font is still Courier and the format still Standard. The reason
seems to be that these style elements are inherited and not \ explicit
in the prototype text cell in the style sheet (its cell expression \ is
\tCell[\tStyleData[\"Text\"],
  \t\tCellMargins->{{12, 10}, {7, 7}},
  \t\tLineSpacing->{1, 3},
  \t\tCounterIncrements->\"Text\"]
 )\
\>", "Text"],

Cell[TextData[{
  "The style \"SmallText\" does have an explicit font \"Helvetica\"  and
font \ size , 9\n(cell expression,\nCell[StyleData[\"SmallText\"], \
CellMargins->{{12, 10}, {6, 6}},\n  LineSpacing->{1, 3},\n  \
CounterIncrements->\"SmallText\",\n  FontFamily->\"Helvetica\",\n  \
FontSize->9]\n)\nand these is effective,\nBut we still need to use ",
  Cell[BoxData[
      \(FormatType -> \ TraditionalForm\)], "Input"],
  " to get tradional format"
}], "Text"],

Cell["You can make the styles be defaults for all graphics by ",
"Text"],

Cell[BoxData[{
    \($TextStyle\  = \ {FontFamily -> "\<Times\>", \ FontSize\  -> \
24}\), 
    \(FormatType -> \ TraditionalForm\)}], "Input"],

Cell["\<\
And you can make them default styles only for graphics made by Plot \ by
using\
\>", "Text"],

Cell[BoxData[
    \(SetOptions[Plot, \n\t\t
      TextStyle\  -> \ {FontFamily -> "\<Times\>", \ FontSize\  -> \
24}, \n
      \t\t\ FormatType -> \ TraditionalForm\n]\)], "Input"],

Cell["Here is a way of changing only the tick styles", "Text"],

Cell[BoxData[
    \(\(\(Show[#, \ \n\t\t\t
          Ticks -> FullOptions[#, Ticks] /. {x_?NumericQ, \ lab_, r__}
:> \ \n
              \t\t\t\t\t\t{x, 
                StyleForm[lab, \n\t\t\t\t\t\t\t
                  FontFamily\  -> \ "\<Helvetica\>", \n\t\t\t\t\t\t\t
                  FontSize\  -> \ 16, \n\t\t\t\t\t\t\t
                  FontColor\  -> \ Hue[0]], r}, \n\t\t\t
          DisplayFunction\  -> \ $DisplayFunction\ \n\t\t]&\)[
      Plot[x, \ {x, 0, 3}, \ \n\t\t\ 
        Ticks\  -> 
          \ \t{{\ {1, \ x\_1}, {2, \ \[Alpha]\/\[Beta]}}, \tAutomatic},
\n\t\t
        DisplayFunction\  -> Identity]]; \)\)], "Input"] }, Open  ]]
},
FrontEndVersion->"Macintosh 3.0",
ScreenRectangle->{{0, 1024}, {0, 748}}, WindowSize->{520, 653},
WindowMargins->{{59, Automatic}, {Automatic, 34}}, ShowCellLabel->False,
MacintoshSystemPageSetup->"\<\
00`0001804P000000bX2 at ?oaooL3>@99:P85N0?N0 at 00004/0B`000003Bl9H001
0000I0000 at 400@0000000BL?0040000000000000000000000000000000000?o2
omX=K at V600P100000000000000000000\>"
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at the
top of  the file.  The cache data will then be recreated when you save
this file  from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{

Cell[CellGroupData[{
Cell[1731, 51, 52, 0, 62, "Subtitle"], Cell[1786, 53, 51, 1, 27,
"Input"],
Cell[1840, 56, 509, 10, 180, "Input"], Cell[2352, 68, 98, 3, 30,
"Text"],
Cell[2453, 73, 413, 8, 164, "Input"], Cell[2869, 83, 368, 10, 142,
"Text"], Cell[3240, 95, 469, 9, 174, "Text"], Cell[3712, 106, 72, 0,
30, "Text"],
Cell[3787, 108, 143, 2, 43, "Input"], Cell[3933, 112, 102, 3, 30,
"Text"], Cell[4038, 117, 180, 3, 75, "Input"], Cell[4221, 122, 62, 0,
30, "Text"],
Cell[4286, 124, 639, 12, 211, "Input"] }, Open  ]]
}
]
*)



(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)


--------------4DFC6969487D--


  • Prev by Date: Re: How to get E**(-x), not 1/E**(x) ?
  • Next by Date: RE: Trivial integral freezes 3.
  • Previous by thread: Re: computer modern plot tick labels
  • Next by thread: converting 3.0 .nb files back to 2.2 ma files