[Mathematica] Pages breaks in middle of graphs
- From: Dave <sorry-no-email@xxxxxxxxxxx>
- Date: Mon, 01 Oct 2007 17:53:14 +0100
I've got a notebook with 50 or so graphs in it. They look fine on the screen, but when printed, or saved to a PDF file, the page breaks occur in silly places, like across the middle of a graph. Is there a way to force Mathematica to be a bit more sensible about where it puts the page breaks?
I'm using Mathematica 6.
I suspect the problem is the way I am displaying the graphs, which is as follows.....
I basically wrote a function called 'PlotAtTimeStamp[file_, time_]', which reads a data file and displays 8 graphs, by reading data from a particular time-stamp in the file. See below.
I have not put the full code, as it would be unnecessarily long. But you can see the basic idea that I call Listplot 8 times, stick its output in variables a1, b1, a2, b2 .. a4, b4, then call
Show[GraphicsArray[{{a1}, {a2}, {a3}, {a4}}, ImageSize -> 400]]
Show[GraphicsArray[{{b1}, {b2}, {b3}, {b4}}, ImageSize -> 400]]
Having 8 graphs on a page (2 horizontally, 4 vertically) would be about right. But I dont want the page breaks occuring in the middle of the graphs.
I'm sure this is not the most sensible way to write a function that plots lots of graphs. Any better suggestion?
PlotAtTimeStamp[file_, time_] :=
Block[ {line, a1, a2,
b1, b2, a3, b3, a4, b4},
(* MOST CODE CUT OUT *)
a1 = ListPlot[Transpose[{steps781, f781}],
PlotStyle -> {Red, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (dBm)"},
PlotLabel -> "26 measurements near 781.075 MHz"];
b1 = ListPlot[Transpose[{steps781, linear781}],
PlotStyle -> {Pink, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (mW)"},
PlotLabel -> "26 measurements near 781.075 MHz (linear scale)"];
a2 = ListPlot[Transpose[{steps900, f900}],
PlotStyle -> {Green, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (dBm)"},
PlotLabel -> "26 measurements near 900.000 MHz"];
b2 = ListPlot[Transpose[{steps900, linear900}],
PlotStyle -> {LightGreen, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (mW)"},
PlotLabel -> "26 measurements near 900 MHz (linear scale)"];
a3 = ListPlot[Transpose[{steps1000, f1000}],
PlotStyle -> {Blue, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (dBm)"},
PlotLabel -> "26 measurements near 1000.000 MHz"];
b3 = ListPlot[Transpose[{steps1000, linear1000}],
PlotStyle -> {LightBlue, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (mW)"},
PlotLabel -> "26 measurements near 1000MHz (linear scale)"];
a4 = ListPlot[Transpose[{steps1290, f1290}],
PlotStyle -> {Black, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (dBm)"},
PlotLabel -> "26 measurements near 1290.000 MHz"];
b4 = ListPlot[Transpose[{steps1290, linear1290}],
PlotStyle -> {Gray, PointSize[0.02]}, Filling -> Axis,
AxesLabel -> {"\nfrequency (MHz)\n", "Power (mW)"},
PlotLabel -> "26 measurements near 1290 MHz (linear scale)"];
Show[GraphicsArray[{{a1}, {a2}, {a3}, {a4}}, ImageSize -> 400]]
Show[GraphicsArray[{{b1}, {b2}, {b3}, {b4}}, ImageSize -> 400]]
]
.
- Follow-Ups:
- Re: [Mathematica] Pages breaks in middle of graphs
- From: Nasser Abbasi
- Re: [Mathematica] Pages breaks in middle of graphs
- Prev by Date: Re: NUMB3RS, Grobner bases, and "Trust Metrics"
- Next by Date: Re: NUMB3RS, Grobner bases, and "Trust Metrics"
- Previous by thread: NUMB3RS, Grobner bases, and "Trust Metrics"
- Next by thread: Re: [Mathematica] Pages breaks in middle of graphs
- Index(es):