It seems to me that the frame labels are too far from the frame. Is
there a way to control their placement and/or move them closer to the
frame?
For example,
Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, Axes -> True,
PlotLabel -> "Plot label", FrameLabel -> {{"y", None}, {"x", None}},
FrameTicks -> Automatic]
I just think the "x" and "y" labels are too far from the frame. This
becomes a real issue for me when I'm putting a bunch of plots in a
GraphicsGrid.
Thanks.
--Mark
P.S. I'm using "6.0 for Microsoft Windows (32-bit) (May 21, 2008)"
and
gr = FullGraphics[
Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, Axes -> True,
PlotLabel -> "Plot label", FrameLabel -> {"x", "y", None, None},
FrameTicks -> Automatic]];
Manipulate[
Show[gr /. {Text["x", a_, opts___] :> Text["x", Scaled[p1], opts],
Text["y", a_, opts___] :> Text["y", Scaled[p2], opts]},
AspectRatio -> 1/GoldenRatio],
{{p1, {0.5, 0.1}}, {-0.5, -0.5}, {1.5, 1.5},
ControlType -> Slider2D},
{{p2, {-0.1, 0.5}}, {-0.5, -0.5}, {1.5, 1.5},
ControlType -> Slider2D}
]
will let you move the labels to the positions you like.
Regards
Jens
I first did this with the Presentations package. The idea is to draw the sin
curve without FrameLabel, leave the necessary amount of ImagePadding to
accommodate the desired labels, set PlotRangeClipping -> False, then Inset
the frame labels where we want using ImageScaled coordinates.
Needs["Presentations`Master`"]
Draw2D[
{Draw[Sin[x], {x, 0, 2 Pi}],
Inset[Style["x", 14], ImageScaled[{.60, .045}]],
Inset[Style["y axis", 14],
ImageScaled[{.04, .54}], {Center, Center}, Automatic, {0, 1}]},
AspectRatio -> 1/GoldenRatio,
Axes -> True,
Frame -> True,
PlotLabel -> "Plot label",
PlotRangeClipping -> False,
ImagePadding -> {{40, 5}, {30, 5}}]
This takes some hand adjusting to get the ImageCoordinates correct. It is
also possible to use actual plot coordinates, which is a little easier. But
it is necessary to specify an explicit PlotRange so the Insets will fall
outside the frame. The plot coordinates for the Insets will be outside the
frame, but that's ok.
Draw2D[
{Draw[Sin[x], {x, 0, 2 Pi}],
Inset[Style["x", 14], {3.5, -1.3}],
Inset[Style["y axis", 14], {-.6, 0}, {Center, Center},
Automatic, {0, 1}]},
AspectRatio -> 1/GoldenRatio,
Axes -> True,
Frame -> True,
PlotRange -> {{0, 2 Pi}, {-1, 1}},
PlotRangePadding -> .1,
PlotLabel -> "Plot Labels Where I Want!",
PlotRangeClipping -> False,
ImagePadding -> {{40, 5}, {30, 5}}]
While the Presentations paradigm helps me think of this, because the frame
labels are just two more things we want to draw, I have to be honest and
show how this can also be done without Presentations. You just have to
remember that you can use the Epilog option to add primitives to a set-piece
plot.
Plot[Sin[x], {x, 0, 2 Pi},
Axes -> True,
Frame -> True,
PlotRange -> {{0, 2 Pi}, {-1, 1}},
PlotRangePadding -> .1,
PlotLabel -> "Plot Labels Where I Want!",
PlotRangeClipping -> False,
ImagePadding -> {{40, 5}, {30, 5}},
Epilog -> {Inset[Style["x", 14], {3.5, -1.3}],
Inset[Style["y axis", 14], {-.6, 0}, {Center, Center},
Automatic, {0, 1}]}]
--
David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/
"Mark Fisher" <particl...@gmail.com> wrote in message
news:g7uo3p$5vf$1...@smc.vnet.net...
--Mark