(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.1' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing 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@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[ 77831, 2158]*) (*NotebookOutlinePosition[ 109659, 3204]*) (* CellTagsIndexPosition[ 109615, 3200]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Guide to TickControl", "Title"], Cell["\<\ A guide to the TickControl package, and notes on creating plots \ suitable for publication.\ \>", "Subtitle"], Cell["\<\ Elizabeth A. Praton Franklin & Marshall College, Dept. of Physics & Astronomy July 2004; revised August 2005\ \>", "Subsubtitle"], Cell[CellGroupData[{ Cell["TickControl", "Section"], Cell["\<\ The functions provided in this package allow you to easily control \ the spacing, size, and labeling of ticks on plot frames or axes. Rather than \ having to specify the position, label, and size of each tick individually, \ these functions allow you to characterize the desired set or sets of major \ and minor ticks in one step. The resulting ticklist(s) will automatically \ span the entire plot region. \ \>", "Text"], Cell["\<\ Note: To make this package accessible, yet keep it separate from \ the standard packages, create a folder called \"Graphics\" inside \ Mathematica's \"AddOns\" \[LongDash]> \"ExtraPackages\" folder. Put the \ TickControl package into this new Graphics folder.\ \>", "Note"], Cell[TextData[Cell[BoxData[ FormBox[GridBox[{ { RowBox[{ StyleBox["MajorTickTable", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Italic"], RowBox[{ StyleBox["xmin", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Italic"], " ", StyleBox["xmax", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Italic"]}], StyleBox[",", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Italic"], RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[ RowBox[{ StyleBox["dx", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[\(ticksize(\(,\)\(\ \)\(tickstyle\))\), FontSlant->"Italic"]}], FontWeight->"Plain", FontSlant->"Italic"], StyleBox["}", FontWeight->"Bold", FontSlant->"Italic"]}]}], StyleBox["]", FontWeight->"Bold", FontSlant->"Italic"]}], RowBox[{ RowBox[{ "creates", " ", "list", " ", "of", " ", "ticks", " ", "between", " ", RowBox[{"Floor", "[", StyleBox["xmin", FontSlant->"Italic"], "]"}], "and", " ", RowBox[{"Floor", "[", StyleBox["xmax", FontSlant->"Italic"], "]"}], "with"}], "\n", RowBox[{ RowBox[{"spacing", StyleBox[" ", FontSlant->"Italic"], StyleBox["dx", FontSlant->"Italic"], StyleBox[" ", FontWeight->"Bold"], "and", " ", "size", " ", RowBox[{ StyleBox["ticksize", FontSlant->"Italic"], ".", " ", "The"}], " ", "default", " ", StyleBox["tickstyle", FontSlant->"Italic"], StyleBox[" ", FontWeight->"Bold"], "is", " ", "the", " ", "system", " ", "default", " ", "style"}], ",", \(e . g . \), ",", RowBox[{\({GrayLevel[0], \ AbsoluteThickness[0.25]} . \ \ It\), " ", "has", " ", "options", " ", StyleBox["ReverseAxis", FontWeight->"Bold"]}], ",", " ", StyleBox["TickLabel", FontWeight->"Bold"], ",", StyleBox[" ", FontWeight->"Bold"], StyleBox["NoFirstLabel", FontWeight->"Bold"], ",", " ", RowBox[{ StyleBox["NoLastLabel", FontWeight->"Bold"], "."}]}]}]}, { RowBox[{ StyleBox["MinorTickTable", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold"], RowBox[{ StyleBox["xmin", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold"], StyleBox[" ", FontSlant->"Italic"], StyleBox["xmax", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold"]}], StyleBox[",", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], RowBox[{ StyleBox["{", FontWeight->"Bold"], RowBox[{ StyleBox["dx", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[\(ticksize(\(,\)\(\ \)\(tickstyle\))\), FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold"]}]}], StyleBox["]", FontWeight->"Bold"]}], RowBox[{ "creates", " ", "list", " ", "of", " ", "ticks", " ", "between", " ", RowBox[{"Floor", "[", StyleBox["xmin", FontWeight->"Plain", FontSlant->"Italic"], StyleBox["]", FontSlant->"Plain"]}], StyleBox[ RowBox[{" ", StyleBox[" ", FontWeight->"Plain"]}]], StyleBox["and", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], RowBox[{"Ceiling", "[", StyleBox["xmax", FontWeight->"Plain", FontSlant->"Italic"], StyleBox["]", FontSlant->"Italic"]}], " ", StyleBox["with", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["spacing", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["dx", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain"], "and", " ", "size", " ", RowBox[{ StyleBox["ticksize", FontSlant->"Italic"], ".", " ", "The"}], " ", "default", " ", StyleBox["tickstyle", FontSlant->"Italic"], StyleBox[" ", FontWeight->"Bold"], "is", " ", "the", " ", "system", " ", "default", " ", \(\(style\)\(.\)\(\ \ \)\)}]} }], TraditionalForm]]]], "2ColumnBox"], Cell["\<\ Functions for generating lists of specifications for major or minor \ ticks\ \>", "Caption"], Cell[TextData[{ Cell[BoxData[ FormBox[GridBox[{ { StyleBox["Option", FontSlant->"Italic"], StyleBox[\(Default\ Value\), FontSlant->"Italic"], " "} }], TraditionalForm]], CellFrame->{{0, 0}, {0.5, 0}}], "\n", Cell[BoxData[ FormBox[GridBox[{ { StyleBox["ReverseAxis", FontWeight->"Bold"], StyleBox["False", FontWeight->"Bold"], RowBox[{ RowBox[{"if", " ", StyleBox["True", FontWeight->"Bold"]}], StyleBox[",", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox[\(reverses\ the\ sign\ of\ the\ major\ \ tick\ \ labels\), FontWeight->"Plain"], StyleBox[",", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox[\(for\ plots\ with\ reversed\ \(\(axes\)\(.\)\)\), FontWeight->"Plain"]}]}, { StyleBox["TickLabel", FontWeight->"Bold"], StyleBox["True", FontWeight->"Bold"], RowBox[{ RowBox[{"if", " ", StyleBox["False", FontWeight->"Bold"]}], ",", " ", \(suppresses\ labels\ on\ the\ major\ \(\(ticks\)\(.\)\)\ \)}]}, { StyleBox["NoFirstLabel", FontWeight->"Bold"], StyleBox["False", FontWeight->"Bold"], RowBox[{ RowBox[{"if", " ", StyleBox["True", FontWeight->"Bold"]}], ",", " ", \(suppresses\ label\ on\ the\ first\ major\ \ \(\(tick\)\(.\)\)\)}]}, { StyleBox["NoLastLabel", FontWeight->"Bold"], StyleBox["False", FontWeight->"Bold"], RowBox[{ RowBox[{"if", " ", StyleBox["True", FontWeight->"Bold"]}], StyleBox[",", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox[\(suppresses\ label\ on\ the\ last\ major\ \ \(\(tick\)\(.\)\)\), FontWeight->"Plain"]}]} }], TraditionalForm]]] }], "3ColumnBox"], Cell["Options for MajorTickList", "Caption"], Cell["This loads the package.", "MathCaption"], Cell[BoxData[ \(<< Graphics`TickControl`\)], "Input"], Cell[TextData[{ "This gives a list of tick specifications for ticks from 0 to 10 in steps \ of 5, size 0.02. Each tick specification has the form ", StyleBox["{x, label, {plen, nlen}}", FontSlant->"Italic"], ", where ", StyleBox["x", FontSlant->"Italic"], " is the tick position, ", StyleBox["label", FontSlant->"Italic"], " is the tick label, and ", StyleBox["plen", FontSlant->"Italic"], " is the length in the positive direction. Note that the length in the \ negative direction is always zero." }], "MathCaption"], Cell[BoxData[ \(MajorTickTable[{0, 10}, {5, 0.02}]\)], "Input"], Cell["This reverses the sign of the tick labels.", "MathCaption"], Cell[BoxData[ \(MajorTickTable[{0, 10}, {5, 0.02}, ReverseAxis \[Rule] True]\)], "Input"], Cell["\<\ This gives a list of tick specifications for minor ticks from 0 to \ 5 in steps of 1. Minor ticks are always unlabeled.\ \>", "MathCaption"], Cell[BoxData[ \(MinorTickTable[{0, 5}, {1, 0.01}]\)], "Input"], Cell["\<\ This leaves off the first label in a list of major tick \ specifications. (This is useful in cases where you want a tick but the label \ interferes/overlaps with something else.)\ \>", "MathCaption"], Cell[BoxData[ \(MajorTickTable[{0, 10}, {5, 0.02}, NoFirstLabel \[Rule] True]\)], "Input"], Cell[TextData[Cell[BoxData[ FormBox[GridBox[{ { RowBox[{ StyleBox["TickTable", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold"], RowBox[{ StyleBox["xmin", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Italic"], StyleBox["xmax", FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["majorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Italic"], StyleBox["minorspace", FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}]}], StyleBox["]", FontWeight->"Bold", FontSlant->"Plain"]}], RowBox[{ RowBox[{ "creates", " ", "list", " ", "of", " ", "major", " ", "and", " ", "minor", " ", "ticks", " ", "between", " ", StyleBox["xmin", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Plain"], StyleBox["and", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["xmax", FontSlant->"Italic"]}], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["with", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["spacings", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["majorspace", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Plain"], StyleBox["and", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["minorspace", FontSlant->"Italic"], StyleBox[".", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["It", FontSlant->"Plain"]}], StyleBox[" ", FontSlant->"Plain"], StyleBox["has", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["the", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["same", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["options", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["as", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["MajorTickTable", FontSlant->"Plain"]}], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["plus", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["options", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["MajorSize", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[",", FontWeight->"Plain", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain"], StyleBox["MinorSize", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[",", FontWeight->"Plain", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain"], StyleBox["MajorStyle", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[",", FontWeight->"Plain", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain"], RowBox[{ StyleBox["and", FontWeight->"Plain", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain"], RowBox[{ StyleBox["MinorStyle", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[".", FontWeight->"Plain", FontSlant->"Plain"]}]}]}]} }], TraditionalForm]]]], "2ColumnBox"], Cell["Function for generating single list of major and minor ticks", "Caption"], Cell[TextData[{ Cell[BoxData[ FormBox[GridBox[{ { StyleBox["Option", FontSlant->"Italic"], StyleBox[\(Default\ Value\), FontSlant->"Italic"], " "} }], TraditionalForm]], CellFrame->{{0, 0}, {0.5, 0}}], "\n", Cell[BoxData[ FormBox[GridBox[{ { StyleBox["MajorSize", FontWeight->"Bold"], StyleBox["0.02", FontWeight-> "Bold"], \(controls\ the\ size\ of\ the\ major\ ticks\ \ \(\((in\ fractional\ units\ of\ overall\ plot\ size)\)\(.\)\)\)}, { StyleBox["MinorSize", FontWeight->"Bold"], StyleBox["0.01", FontWeight-> "Bold"], \(controls\ the\ size\ of\ the\ minor\ \(\(ticks\)\ \(.\)\(\ \)\)\)}, { StyleBox["MajorStyle", FontWeight->"Bold"], StyleBox[\({}\), FontWeight-> "Bold"], \(controls\ the\ style\ of\ the\ major\ \ \(\(ticks\)\(.\)\)\)}, { StyleBox["MinorStyle", FontWeight->"Bold"], StyleBox[\({}\), FontWeight-> "Bold"], \(controls\ the\ style\ of\ the\ minor\ \ \(\(ticks\)\(.\)\)\)} }], TraditionalForm]]] }], "3ColumnBox"], Cell["Options for TickTable", "Caption"], Cell["\<\ Here is a list of list of tick specifications from 0 to 10, with \ major ticks every 5 units and minor ticks every 1 unit; the sign of the tick \ labels are reversed, and the size of the major ticks is larger than the \ default.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(TickTable[{0, 10}, {5, 1}, ReverseAxis \[Rule] True, MajorSize \[Rule] 0.05]\)], "Input"], Cell["\<\ Here is a list of tick specifications from 0 to 2\[Pi], with major \ ticks spaced \[Pi] units apart and minor ticks space \[Pi]/2 units \ apart.\ \>", "MathCaption"], Cell[BoxData[ \(TickTable[{0, 2\ Pi}, {Pi, \ Pi/2}]\)], "Input", PageBreakAbove->False], Cell["\<\ Here is a plot of a sine function, with x-axis major ticks every \ \[Pi] units and y-axis major ticks every 1 unit. \ \>", "MathCaption"], Cell[BoxData[ \(\(Plot[ Sin[x], {x, 0, 4 Pi}, \[IndentingNewLine]Ticks \[Rule] {TickTable[{0, 4 Pi}, {Pi, Pi/2}], TickTable[{\(-1\), 1}, {1, 0.5}]}];\)\)], "Input"], Cell[TextData[{ Cell[BoxData[ FormBox[GridBox[{ { RowBox[{ StyleBox["TickTable2D", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold"], RowBox[{ StyleBox["xmajorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[\(xminorspace(\(,\)\(\ \)\(xopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["ymajorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[\(yminorspace(\(,\)\(\ \)\(yopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], RowBox[{ StyleBox["(", FontWeight->"Plain", FontSlant->"Plain"], RowBox[{ StyleBox[",", FontWeight->"Plain", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain"], StyleBox["xyopts", FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox[")", FontWeight->"Plain", FontSlant->"Italic"]}]}]}], StyleBox["]", FontWeight->"Bold", FontSlant->"Plain"]}], RowBox[{ RowBox[{ "creates", " ", "lists", " ", "of", " ", "x", " ", "and", " ", "y", " ", "axes", " ", "ticks", " ", "for", " ", "the", " ", StyleBox["Ticks", FontWeight->"Bold"], " ", "option", " ", "in", " ", "functions", " ", "like", " ", RowBox[{ StyleBox["Plot", FontWeight->"Bold"], ".", " ", "The"}], " ", "major", " ", "and", " ", "minor", " ", "tick", " ", "spacings", " ", "are", " ", "as", " ", "specified", " ", "by", " ", StyleBox["xmajorspace", FontSlant->"Italic"]}], ",", " ", \(etc . \ \ \ It\ takes\ the\ same\ options\ as\ \ TickTable\), ",", " ", \(and\ the\ x\ and\ y\ \ options\ may\ be\ specified\ \ separately\ or\ \(\(together\)\(.\)\)\)}]}, { RowBox[{ StyleBox["TickTable3D", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold"], RowBox[{ StyleBox["xmajorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[\(xminorspace(\(,\)\(\ \)\(xopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["ymajorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[\(yminorspace(\(,\)\(\ \)\(yopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[",", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox[ RowBox[{ StyleBox["z", FontWeight->"Plain", FontSlant->"Plain"], StyleBox["majorspace", FontWeight->"Plain", FontSlant->"Italic"]}]], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox[ RowBox[{ StyleBox["z", FontWeight->"Plain", FontSlant->"Plain"], StyleBox["minorspace", FontWeight->"Plain", FontSlant->"Italic"]}]], StyleBox["(", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[\(\(,\)\(\ \)\(zopts\)\), FontWeight->"Plain", FontSlant->"Italic"], StyleBox[")", FontWeight->"Plain", FontSlant->"Italic"]}]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[\((\(,\)\(\ \)\(xyzopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}]}], StyleBox["]", FontWeight->"Bold", FontSlant->"Plain"]}], RowBox[{"\[IndentingNewLine]", RowBox[{\(same\ as\ TickTable2D\), ",", " ", \(except\ creates\ lists\ of\ x\), ",", " ", "y", ",", " ", RowBox[{ "z", " ", "axes", " ", "ticks", " ", "for", " ", "the", " ", StyleBox["Ticks", FontWeight->"Bold"], " ", "option", " ", "in", " ", "functions", " ", "like", StyleBox[" ", FontWeight->"Bold"], RowBox[{ StyleBox["Plot3D", FontWeight->"Bold"], "."}]}]}]}]} }], TraditionalForm]]], "\n" }], "2ColumnBox"], Cell["\<\ Here is a plot with axes tick labels automatically generated by \ TickTable2D. \ \>", "MathCaption"], Cell[BoxData[ \(\(Plot[Sin[x], {x, 0, 4 Pi}, \ Ticks \[Rule] TickTable2D[{Pi, Pi/2}, {1, 0.5}]];\)\)], "Input"], Cell["\<\ Here is a 3D plot with axes tick labels generated by TickTable3D. \ \ \>", "MathCaption"], Cell[BoxData[ \(\(Plot3D[Sin[x*y], {x, 0, 3 Pi}, {y, 0, 1}, Shading \[Rule] False, Ticks \[Rule] TickTable3D[{Pi, Pi/2}, {0.2, 0.1}, {1, 0.5}\ ]];\)\)], "Input"], Cell[TextData[Cell[BoxData[ FormBox[GridBox[{ { RowBox[{ StyleBox["FrameTickTable", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold"], RowBox[{ StyleBox["xmajorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[\(xminorspace(\(,\)\(\ \)\(xopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["ymajorspace", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[\(yminorspace(\(,\)\(\ \)\(yopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Plain"]}], StyleBox[\((\(,\)\(\ \)\(xyopts\))\), FontWeight->"Plain", FontSlant->"Italic"]}]}], StyleBox["]", FontWeight->"Bold", FontSlant->"Plain"]}], RowBox[{ RowBox[{ "creates", " ", "lists", " ", "of", " ", "ticks", " ", "for", " ", "the", " ", StyleBox["FrameTicks", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Plain"], StyleBox["option", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["in", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["framed", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], RowBox[{ StyleBox["plots", FontWeight->"Plain"], ".", " ", "The"}], " ", "major", " ", "and", " ", "minor", " ", "tick", " ", "spacings", " ", "for", " ", "the", " ", "x", " ", "and", " ", "y", " ", "axes", " ", "are", " ", "as", " ", "specified", " ", "by", " ", StyleBox["xmajorspace", FontSlant->"Italic"]}], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[\(etc . \ \ It\ takes\ the\ same\ options\ as\ \ TickTable\), FontSlant->"Plain"], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["plus", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["the", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["option", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["TickLabel", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{\((see\ below)\), StyleBox[".", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["The", FontSlant->"Plain"]}], StyleBox[" ", FontSlant->"Plain"], StyleBox["x", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Plain"], StyleBox["and", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["y", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Plain"], StyleBox["options", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["may", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["be", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["specified", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["separately", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["as", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["xopts", FontSlant->"Italic"]}], StyleBox[",", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Italic"], StyleBox["yopts", FontSlant->"Italic"], StyleBox[",", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["or", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["together", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["as", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["xyopts", FontSlant->"Italic"], StyleBox[".", FontSlant->"Plain"]}]}]}]} }], TraditionalForm]]]], "2ColumnBox"], Cell["\<\ Function for generating four lists of major and minor tick \ specifictions (for four sides of frame)\ \>", "Caption"], Cell[TextData[{ Cell[BoxData[ FormBox[GridBox[{ { StyleBox["Option", FontSlant->"Italic"], StyleBox[\(Default\ Value\), FontSlant->"Italic"], " "} }], TraditionalForm]], CellFrame->{{0, 0}, {0.5, 0}}], "\n", Cell[BoxData[ FormBox[GridBox[{ { StyleBox["TickLabel", FontWeight->"Bold"], StyleBox[\({True, \ False}\), FontWeight->"Bold"], RowBox[{ RowBox[{ "controls", " ", "whether", " ", "major", " ", "ticks", " ", "are", " ", "labeled", " ", "on", " ", "opposite", " ", "sides", " ", "of", " ", "the", " ", \(frame . \ \ The\), " ", "default", " ", "labels", " ", "the", " ", "first", " ", "but", " ", "not", " ", "the", " ", "second", " ", "side", " ", \(\((i . e . , \ bottom\ but\ not\ \ top, \ or\ \ left\ but\ not\ \ right)\) . \ \ Other\), " ", "settings", " ", "are", " ", StyleBox[\({False, \ True}\), FontWeight->"Bold"], StyleBox[" ", FontWeight->"Plain"], StyleBox["to", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["label", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["second", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["side", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["only", FontWeight->"Plain"]}], StyleBox[",", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], RowBox[{ StyleBox["True", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Plain"], StyleBox["to", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["label", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["both", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["sides", FontWeight->"Plain"]}], StyleBox[",", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], RowBox[{ StyleBox["or", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["False", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Plain"], StyleBox["to", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["label", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox["neither", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Plain"], StyleBox[\(\(side\)\(.\)\), FontWeight->"Plain"]}]}]} }], TraditionalForm]]] }], "3ColumnBox"], Cell["Option for FrameTickTable", "Caption"], Cell["\<\ Here is a framed plot of a sine function, with major x ticks every \ \[Pi] units and major y ticks every 1 unit. Note the default is to label \ only the left and bottom side of the frame.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(Plot[Sin[x], {x, 0, 4 Pi}, Frame \[Rule] True, FrameTicks \[Rule] FrameTickTable[{Pi, Pi/4}, {1, 0.2}]];\)\)], "Input"], Cell["\<\ Here is the same plot, without the last major tick label on the \ x-axis. (Getting rid of tick labels near edges can be useful, for example, \ if the plot will be combined with another plot in an array.)\ \>", \ "MathCaption"], Cell[BoxData[ \(\(Plot[Sin[x], {x, 0, 4 Pi}, Frame \[Rule] True, FrameTicks \[Rule] FrameTickTable[{Pi, Pi/4, NoLastLabel \[Rule] True}, {1, 0.2}]];\)\)], "Input"], Cell["Here is a plot with tick labels on the top and right sides.", \ "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(gr\ = \ Plot[Sin[x], {x, 0, 4 Pi}, Frame \[Rule] True, FrameTicks \[Rule] FrameTickTable[{Pi, Pi/4}, {1, 0.2}, TickLabel \[Rule] {False, True}]];\)\)], "Input"], Cell["\<\ Here is a plot with unlabeled y ticks and x ticks labeled (with \ reversed sign) on both top and bottom edges, where both x and y major ticks \ are extra large.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(Plot[Sin[x], {x, 0, 4 Pi}, Frame \[Rule] True, FrameTicks \[Rule] FrameTickTable[{Pi, Pi/2, ReverseAxis \[Rule] True, TickLabel \[Rule] True}, {1, 0.5, TickLabel \[Rule] False}, MajorSize \[Rule] 0.05], PlotRange \[Rule] {{0, 4\ Pi}, {\(-1.5\), 1.5}}];\)\)], "Input"], Cell["\<\ Here is a plot with frame and ticks thicker than the default. \ Frame will be 3 pts thick; major ticks will be 2 pts thick; minor ticks will \ be 1 pt thick.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(gr\ = \ Plot[Sin[x], {x, 0, 4 Pi}, Frame \[Rule] True, FrameStyle \[Rule] AbsoluteThickness[2], FrameTicks \[Rule] FrameTickTable[{Pi, Pi/4}, {1, 0.2}, MajorStyle \[Rule] AbsoluteThickness[2], MinorStyle \[Rule] AbsoluteThickness[1]]];\)\)], "Input"], Cell["\<\ The plot style can be changed via the PlotStyle or Prolog option as \ usual, without affecting the frame or ticks. Here is the same plot, with the \ curve dashed and colored red.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(Show[gr, Prolog \[Rule] {RGBColor[1, 0, 0], Dashing[{0.06}]}];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Plots for Publication", "Section", PageBreakAbove->True], Cell[TextData[{ "Journals urge that line widths, tick lengths, and tick labels of any \ graphics submitted for publication be bold enough for good legibility when \ reduced. Unfortunately, the default frame ticks and line style in ", StyleBox["Mathematica", FontSlant->"Italic"], " (v.4.2) are less bold than most journals prefer. The default tick \ lengths can be too short to see easily, and the default line thickness are \ thinner than the minimum recommended (0.5 pt). Also, many authors prefer a \ font such as Helvetica for labels, rather than ", StyleBox["Mathematica'", FontSlant->"Italic"], "s default Courier-like font. The notes below show how to deal with \ several problems often encountered when trying to create plots suitable for \ publication.\nThe notes start by showing what the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " defaults are and how to reset those defaults, using the TickControl \ package, for bolder ticks, lines, and labels. Then they demonstrate how to \ use TickControl to create plots of data where one or more axes must be \ reversed\[LongDash]a situation often faced by astronomers.\nThe next examples \ show how to create good-looking plot arrays, by using TickControl together \ with another non-standard package: ", StyleBox["StackedGraphicsArray", FontWeight->"Bold"], " by Markus Lischka (available from the ", StyleBox["MathSource", FontSlant->"Italic"], " archive at the Wolfram website ", StyleBox["http://www.wolfram.com", FontVariations->{"Underline"->True}], StyleBox["). Lischka's package creates arrays of plots with aligned axes. \ The TickControl package gives control over tick size, placement, labels, and \ axis direction of individual plots within an array, and also provides a \ function which expands labeling options for the array.\nThe notes finish with \ an example showing how to export a completed graphic to an encapsulated \ postscript file.", FontVariations->{"CompatibilityType"->0}] }], "Text"], Cell["\<\ Note: To make the StackedGraphicsArray package accessible, yet \ keep it separate from the standard packages, put it inside the same folder \ created for TickControl (AddOns \[LongDash]> ExtraPackages \[LongDash]> \ Graphics).\ \>", "Note"], Cell[CellGroupData[{ Cell["System Defaults", "Subsection"], Cell["Here is a framed plot produced by the system defaults.", "MathCaption"], Cell[BoxData[ \(\(pl1\ = \ Plot[Sin[x], {x, 0, 2 Pi}, Frame \[Rule] True];\)\)], "Input"], Cell[TextData[{ "This shows the default thickness of the frame (0.25 pt in ", StyleBox["Mathematica", FontSlant->"Italic"], " 4)." }], "MathCaption"], Cell[BoxData[ \(AbsoluteOptions[pl1, FrameStyle]\)], "Input"], Cell["\<\ This shows the default thicknesses (0.25 and 0.125 pts, \ respectively) and the default lengths (0.00625 and 0.00375) of major and \ minor ticks. (Note: if list does not display, change number of lines in \ Short.)\ \>", "MathCaption"], Cell[BoxData[ \(AbsoluteOptions[pl1, FrameTicks] // Short[#, 5] &\)], "Input"], Cell["This plot shows the default size of points.", "MathCaption", PageBreakBelow->False], Cell[BoxData[{ \(\(data = Table[{Random[], Random[]}, {10}];\)\), "\[IndentingNewLine]", \(\(pl2\ = \ ListPlot[data, Frame \[Rule] True, Axes \[Rule] False];\)\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Resetting Defaults", "Subsection"], Cell["\<\ Here's how to reset the defaults for longer and thicker ticks, \ using the TickControl package. You can reset the frame style to match, and \ also change the default line style, point style, and font, using built-in \ functions. The minimum line thickness suggested by journals is 0.5 pt, so a good choice \ for a new default is AbsoluteThickness[0.5] or AbsoluteThickness[1]. You can \ also use Thickness[0.005], but note that the line thickness will then scale \ up or down as the plot scales up or down. Points, like lines, can be scalable in size or absolute. For points which \ will remain legible no matter what the reduction, try AbsolutePointSize[2] to \ AbsolutePointSize[4]. For scalable points, try PointSize[0.01] or \ PointSize[0.02]. One way to change the default font is to use $TextStyle. The original \ setting is $TextStyle = {}. Setting one or more FontFamily, FontSize, etc., \ options in $TextStyle will override that option in the system default. \ \>", \ "Text"], Cell[TextData[{ " Note: Once a plot is exported to an encapsulated postscript file and \ included in a ", Cell[BoxData[ StyleBox[ RowBox[{"T", AdjustmentBox["E", BoxMargins->{{-0.075, -0.085}, {0, 0}}, BoxBaselineShift->0.5], "X"}]]]], " file, the font size of the text will scale up or down as the image is \ scaled up or down. However, points and lines with AbsolutePointSize, \ AbsoluteThickness, or AbsoluteDashing will not; they will always remain 5 pt \ thick, or whatever, no matter what the size of the plot. (This can cause \ problems if plots with AbsoluteDashing are scaled too small: the dashing \ spacing can become too large relative to the line length.) If you want lines \ and points that scale up and down with the text, so that the plot always \ retains its original proportions, use PointSize, Thickness, and Dashing. On \ the other hand, if you want to ensure that lines and points will always be \ legible no matter what the reduction, or if you want to ensure that plots of \ different reductions look similar, use absolute sizes. " }], "Note"], Cell["This loads the package (if not already loaded).", "MathCaption"], Cell[BoxData[ \(<< Graphics`TickControl`\)], "Input"], Cell["Here's a new line thickness. ", "MathCaption"], Cell[BoxData[ \(\(newthick = AbsoluteThickness[0.5];\)\)], "Input"], Cell[TextData[{ "This resets the tick styles to make them thicker. Note that the major and \ minor tick lengths are already reset longer than the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " default." }], "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(SetOptions[FrameTickTable, \ MajorStyle \[Rule] newthick, MinorStyle \[Rule] newthick]\)], "Input"], Cell["\<\ These reset Plot's and ListPlot's default frame and plot styles, \ and sets Frame to True. \ \>", "MathCaption"], Cell[BoxData[ \(\(SetOptions[Plot, Frame \[Rule] \ True, \ FrameStyle \[Rule] newthick, PlotStyle \[Rule] newthick];\)\)], "Input"], Cell[BoxData[ \(\(SetOptions[ListPlot, Frame \[Rule] True, FrameStyle \[Rule] newthick, PlotStyle \[Rule] {newthick, AbsolutePointSize[4]}];\)\)], "Input"], Cell["\<\ This changes the default font family (but leaves the size the same \ as before).\ \>", "MathCaption"], Cell[BoxData[ \(\($TextStyle = {FontFamily \[Rule] Helvetica};\)\)], "Input"], Cell["Here's a plot showing the some of the new defaults.", "MathCaption"], Cell[BoxData[ \(\(pl2 = Plot[Sin[x], {x, 0, 4 Pi}, PlotRange \[Rule] {\(-2\), 2}, FrameTicks -> FrameTickTable[{Pi, Pi/4}, {1, 0.25}]];\)\)], "Input"], Cell["This makes the default font size smaller.", "MathCaption"], Cell[BoxData[ \(\($TextStyle = {FontFamily \[Rule] Helvetica, FontSize \[Rule] 10};\)\)], "Input"], Cell["\<\ Note that changing $TextStyle affects previously generated graphics \ as well as new ones.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(Show[pl2];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Plots with Reversed Axes", "Subsection"], Cell[TextData[{ "Astronomers often have to construct plots with reversed axes, such as when \ they are plotting some quantity vs. magnitude (which gets brighter the \ smaller the number is). TickControl's ", StyleBox["ReverseAxis", FontWeight->"Bold"], " option makes this easier. The example below shows one way to do it." }], "Text"], Cell["\<\ Here is a list of names, distances, and absolute magnitudes for \ five galaxies (Lang 1980, Astrophysical Formulae).\ \>", "MathCaption"], Cell[BoxData[ \(\(gals = {{"\", 2.4, \(-16.45\)}, {"\", 2.4, \(-20.38\)}, {"\", 15.1, \(-20.24\)}, {"\", 0.69, \(-15.7\)}, {"\", 0.69, \(-21.81\)}};\)\)], "Input"], Cell["\<\ Define a function that will pull out the coordinates to be plotted, \ and multiply the coordinate to be reversed by -1.\ \>", "MathCaption"], Cell[BoxData[ \(ff[{name_, dist_, mag_}] := {dist, \(-mag\)}\)], "Input"], Cell["\<\ Plot the data, using FrameTickTable to specify the tick spacing and \ setting ReverseAxis to True for the y-axis. \ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(gr = ListPlot[Map[ff, gals], FrameTicks \[Rule] FrameTickTable[{5, 1}, {2, 1, ReverseAxis \[Rule] True}]];\)\)], "Input"], Cell["\<\ Here's the plot with frame labels, and other settings adjusted to \ look better. When adjusting the plot range, remember that the y-coordinates \ of the plot data have the opposite sign as what appears on the y-axis.\ \>", \ "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(Show[gr, PlotRange \[Rule] {{0, 20}, {14, 26}}, Axes \[Rule] None, FrameLabel \[Rule] {"\", "\"}, ImageSize \[Rule] 200];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Arrays", "Subsection"], Cell["\<\ It's often useful to combine several plots into an array drawn such \ that axes of the plot areas coincide and interior tick labels are removed. \ The third party package Graphics`StackedGraphicsArray` has functions that \ accomplish this easily for most plots.\ \>", "Text"], Cell["This loads the package.", "MathCaption"], Cell[BoxData[ \(<< Graphics`StackedGraphicsArray`\)], "Input"], Cell["Here's info about StackedGraphicsArray.", "MathCaption"], Cell[BoxData[ \(\(?StackedGraphicsArray\)\)], "Input"], Cell["Here are some frame labels.", "MathCaption"], Cell[BoxData[ \(\(labs = {"\", "\"};\)\)], "Input"], Cell["This sets some options useful for making sample plots.", "MathCaption"], Cell[BoxData[ \(\(SetOptions[Plot, FrameLabel \[Rule] labs, FrameTicks \[Rule] FrameTickTable[{Pi, Pi/4}, {1, 0.25}], PlotRange \[Rule] {{\(-3\) Pi, 3 Pi}, {\(-2\), 2}}, Axes \[Rule] None, DisplayFunction \[Rule] Identity];\)\)], "Input"], Cell["Here are graphics of two sample plots.", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\({plot1, plot2} = {Plot[Sin[x], {x, \(-2\) Pi, 2 Pi}], Plot[Cos[2 x], {x, \(-2\) Pi, 2 Pi}]};\)\)], "Input"], Cell["This resets the default size for displayed graphics.", "MathCaption"], Cell[BoxData[ \(\(SetOptions[Graphics, ImageSize \[Rule] 290];\)\)], "Input"], Cell["\<\ Here's an array made with the plots. Note that the tick labels \ overlap where the plots meet.\ \>", "MathCaption"], Cell[BoxData[ \(\(Show[StackedGraphicsArray[{plot1, plot2}]];\)\)], "Input"], Cell[CellGroupData[{ Cell["Strategies for dealing with overlapping tick labels", "Subsubsection"], Cell[TextData[{ "One way to avoid overlapping tick labels in an array is to separate \ individual plots, using the ", StyleBox["GraphicsSpacing", FontWeight->"Bold"], " option. Note however that StackedGraphicsArray automatically removes \ interior tick labels only when GraphicsSpacing is 0. If you don't want \ interior labels when plots are separated, you have to manually remove them, \ using StackedGraphicArray's ", StyleBox["StackedLabel", FontWeight->"Bold"], " option." }], "Text"], Cell["Here's info about the StackedLabel option.", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(?StackedLabel\)\)], "Input"], Cell["\<\ This inserts a space between the plots. Note that the interior \ tick and axes labels are retained with the default setting of StackedLabel.\ \ \>", "MathCaption"], Cell[BoxData[ \(\(Show[ StackedGraphicsArray[{plot1, plot2}, GraphicsSpacing \[Rule] 0.3]];\)\)], "Input"], Cell["This removes the y-axis labels on the second plot.", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(Show[ StackedGraphicsArray[{plot1, plot2}, GraphicsSpacing \[Rule] 0.3, StackedLabel \[Rule] {{Automatic, Automatic, None, None}, {Automatic, None, None, None}}]];\)\)], "Input"], Cell[TextData[{ "Another way to deal with overlapping tick labels is to regenerate \ individual plots without the first and/or last tick label, using \ TickControl's ", StyleBox["NoFirstLabel", FontWeight->"Bold"], " and/or ", StyleBox["NoLastLabel", FontWeight->"Bold"], " options." }], "Text"], Cell["\<\ This resets the default frame ticks so there will be no first or \ last tick labels on any axis.\ \>", "MathCaption"], Cell[BoxData[ \(\(SetOptions[MajorTickTable, NoFirstLabel \[Rule] True, NoLastLabel \[Rule] True];\)\)], "Input"], Cell["This regenerates the plots.", "MathCaption"], Cell[BoxData[ \(\({plot1, plot2} = {Plot[Sin[x], {x, \(-2\) Pi, 2 Pi}], Plot[Cos[2 x], {x, \(-2\) Pi, 2 Pi}]};\)\)], "Input"], Cell["\<\ Now there are no overlapping tick labels in the array. Note the \ array can be made larger than the default size by using the ImageSize option \ in Show.\ \>", "MathCaption"], Cell[BoxData[ \(\(Show[StackedGraphicsArray[{plot1, plot2}], ImageSize \[Rule] 400];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Labels", "Subsubsection"], Cell[TextData[{ "Sometimes it's useful to run a common label across an entire edge of an \ array, instead of having multiple individual ones. The function ", StyleBox["AddFrameLabel", FontWeight->"Bold"], " included in the TickControl package will do this. (Note: This function \ will work for any graphic, not just arrays.)" }], "Text", PageBreakBelow->False], Cell[TextData[Cell[BoxData[ FormBox[GridBox[{ { RowBox[{ StyleBox["AddFrameLabel", FontWeight->"Bold"], StyleBox["[", FontWeight->"Bold"], RowBox[{ StyleBox["graphic", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["{", FontWeight->"Bold", FontSlant->"Plain"], RowBox[{ StyleBox["label1", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Italic"], StyleBox["label2", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold", FontSlant->"Plain"], StyleBox["...", FontWeight->"Plain", FontSlant->"Italic"]}], StyleBox["}", FontWeight->"Bold", FontSlant->"Italic"]}]}], StyleBox["]", FontWeight->"Bold", FontSlant->"Italic"]}], RowBox[{ RowBox[{ "adds", " ", "labels", " ", "around", " ", "the", " ", "edges", " ", "of", " ", StyleBox["graphic", FontSlant->"Italic"]}], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["ordered", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["clockwise", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["starting", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["from", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["the", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["bottom", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[\(edge . \ \ \ \ Labels\), FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["must", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["be", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[\(strings . \ \ This\), FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["routine", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[ RowBox[{ StyleBox["p", FontSlant->"Plain"], "laces"}]], " ", "the", " ", "graphic", StyleBox[" ", FontSlant->"Plain"], StyleBox["in", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["rectangle", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["whose", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["center", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["is", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["at", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[\({0, 0}\), FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["and", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["whose", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["boundaries", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["are", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["{", FontSlant->"Plain"], RowBox[{ RowBox[{ StyleBox["{", FontSlant->"Plain"], RowBox[{ StyleBox[\(-1\), FontSlant->"Plain"], StyleBox[",", FontSlant->"Plain"], " ", RowBox[{"-", StyleBox["as", FontSlant->"Italic"]}]}], StyleBox["}", FontSlant->"Plain"]}], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["{", FontSlant->"Plain"], RowBox[{ StyleBox["1", FontSlant->"Plain"], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["as", FontSlant->"Italic"]}], StyleBox["}", FontSlant->"Plain"]}]}], StyleBox["}", FontSlant->"Plain"]}]}], StyleBox[",", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], RowBox[{ StyleBox["where", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["as", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Plain"], StyleBox["is", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["the", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[\(graphic'\), FontSlant->"Plain"], StyleBox["s", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["aspect", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox[\(\(ratio\)\(.\)\), FontSlant->"Plain"]}]}]} }], TraditionalForm]]]], "2ColumnBox"], Cell["Adding frame labels around a graphic.", "Caption"], Cell["Here are four sample plots without individual frame labels.", \ "MathCaption"], Cell[BoxData[ \(\({pl1, pl2, pl3, pl4} = \[IndentingNewLine]Table[ Plot[Sin[n\ x], {x, \(-2\) Pi, 2 Pi}, FrameLabel \[Rule] None], {n, 1, 4}];\)\)], "Input"], Cell["Here they are combined in an array.", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(grarray = Show[StackedGraphicsArray[{{pl1, pl2}, {pl3, pl4}}], DisplayFunction \[Rule] Identity];\)\)], "Input"], Cell["\<\ Here is the array with some labels. Notice the fourth label is \ oriented the same as the second label (reads from bottom to top). As usual, \ labels running vertically will print out correctly, even though they don't \ display correctly.\ \>", "MathCaption", PageBreakBelow->False], Cell[BoxData[ \(\(AddFrameLabel[ grarray, {"\