Re: Framed plot provides an extra vertical line

*To*: mathgroup at smc.vnet.net*Subject*: [mg127214] Re: Framed plot provides an extra vertical line*From*: "djmpark" <djmpark at comcast.net>*Date*: Sun, 8 Jul 2012 22:45:03 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net*References*: <8207946.107757.1341788822213.JavaMail.root@m06>

Bob, Mathematica fakes users out because they assume that if they specify a Frame the Axis will be eliminated. Not so and what you are seeing are automatically generated Axis lines. There is also a horizontal one. So try this: tTicks = Range[0, 24 30, 24]; tGrid = Range[0, 24 30, 6]; Plot[{Sin[t]}, {t, 24, 24 10}, PlotRange -> {{24, 24 10}, {-3, 3}}, Frame -> True, FrameTicks -> {tTicks, Automatic}, GridLines -> {tGrid, Automatic}, GridLinesStyle -> GrayLevel[0.85], Axes -> None] The GridLinesStyle -> GrayLevel[0.85] option was added as an example of Edward Tufte's maxim: In a graphic, ancillary information should be added with the minimum effective difference. The curve or data are the important information. Grid lines should not stomp all over the message. Doesn't that look better? David Park djmpark at comcast.net http://home.comcast.net/~djmpark/index.html From: Robert McHugh [mailto:rtmphone09 at gmail.com] Sometimes I have observed the Plot command produces a plot with an extra vertical line. An examples of what I mean is in the first graph below, which is a framed plot with specified ticks and grid lines for the x-axis. Note the extra vertical line running the height of the plot at x = 50. It is interesting to note that this vertical line is at the same location that Plot would automatically place the y-axis, as shown by the second plot, which is an unframed plot with default settings. Note that in this case, the frame ticks and grid spacing was chosen to correspond to a 24 hour cycle, i.e. one tick for each day and a 6 hour grid spacing. There is probably some command that I should add to the first plot to suppress this extra vertical line. Can someone point out what that command is? Thanks, Bob. tTicks = Range[0, 24 30, 24]; tGrid = Range[0, 24 30, 6]; Plot[ { Sin[t]}, {t, 24, 24 10 } , PlotRange -> {{24, 24 10}, {-3, 3} } , Frame -> True , FrameTicks -> {tTicks, Automatic} , GridLines -> {tGrid, Automatic} ] Plot[ { Sin[t]}, {t, 24, 24 10 } , PlotRange -> {{24, 24 10}, {-3, 3} } ]