f

Change position of axes label

```Hi

I have the following plot

Plot[x^2, {x, -2.5, 2.5},
Frame -> True,
PlotRange -> {-0.012, 0.012},
AxesLabel -> {"label 1", "label 2"}]

Is it possible to move "label 2" such that it stands right above the
vertical axis? I.e., I want to move "label 2" to the left. The
position of "label 1" is perfect.

Best regards,
Jimmy.

```
 0
Jim
4/18/2010 9:56:58 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers.

3 Replies
6116 Views

Similar Articles

[PageSpeed] 27

```Is this acceptable?

Plot[x^2, {x, -2.5, 2.5},
Frame -> True,
PlotRange -> {-0.012, 0.012},
AxesLabel -> {"label 1", "  label 2"}]

That is, add a space or two at the beginning of label 2....

Cheers,

t.

> Plot[x^2, {x, -2.5, 2.5},
>  Frame -> True,
>  PlotRange -> {-0.012, 0.012},
>  AxesLabel -> {"label 1", "  label 2"}]
>
> Is it possible to move "label 2" such that it stands right above the
> vertical axis? I.e., I want to move "label 2" to the left. The
> position of "label 1" is perfect.
>
>
> Best regards,
> Jimmy.

```
 0
Tyler
4/19/2010 6:49:06 AM
```Essential you can "roll your own" labels by using Text statements "outside
the Frame". In order to make this work you need to:
1) Set PlotRangeClipping -> False.
2) Specify ImagePadding large enough to provide room for the labels (and
tick values also).
3) Specify the label(s) in an Epilog option.

Plot[x^2, {x, -2.5, 2.5},
Frame -> True,
PlotRange -> {-0.012, 0.012},
AxesLabel -> {"label 1", None},
Epilog -> {Text["label 2", {-2.5, 0.0135}]},
PlotRangeClipping -> False,
ImagePadding -> {{50, 50}, {20, 20}}]

The following draws both labels using the Epilog statement.

Plot[x^2, {x, -2.5, 2.5},
Frame -> True,
PlotRange -> {-0.012, 0.012},
Epilog ->
{Text["label 1", {2.7, 0}, {-1, 0}],
Text["label 2", {-2.5, 0.0135}]},
PlotRangeClipping -> False,
ImagePadding -> {{50, 50}, {20, 20}}]

One of the minor problems with normal Frame labels is that the bottom label
is often too far from the frame. This kind of custom labeling can solve the
problem.

For those who have Presentations you don't have to use Epilog but can
include the Text labels in the list of items to be drawn. But there is a
caveat because we don't want the parabola to be drawn outside the frame,
which the PlotRangeClipping option would now allow, so we have to include a
PlotRange option in the Draw statement. In this example I place the bottom
label under, but close to the frame - just as an example.

Needs["Presentations`Master`"]

Draw2D[
{Draw[x^2, {x, -2.5, 2.5}, PlotRange -> {-0.012, 0.012}],
Text["label 1", {1.5, -0.0135}],
Text["label 2", {-2.5, 0.0135}]},
AspectRatio -> .6,
Frame -> True, Axes -> True,
PlotRange -> {{-2.5, 2.5}, {-0.012, 0.012}},
PlotRangeClipping -> False,
ImagePadding -> {{50, 10}, {40, 20}}]

David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/

From: Jim Lambaugh [mailto:lambaugh@gmail.com]

Hi

I have the following plot

Plot[x^2, {x, -2.5, 2.5},
Frame -> True,
PlotRange -> {-0.012, 0.012},
AxesLabel -> {"label 1", "label 2"}]

Is it possible to move "label 2" such that it stands right above the
vertical axis? I.e., I want to move "label 2" to the left. The
position of "label 1" is perfect.

Best regards,
Jimmy.

```
 0
David
4/19/2010 6:49:17 AM
```Hi, Jimmy,
try this:

Plot[x^2, {x, -2.5, 2.5}, Frame -> True, PlotRange -> {-0.012, 0.012},
AxesLabel -> {"label 1", Row[{"label 2", Spacer[229]}]}]

Would not be more comfortable to use FrameLabel instead of AxesLabel in this case?

Have fun, Alexei

Hi

I have the following plot

Plot[x^2, {x, -2.5, 2.5},
Frame -> True,
PlotRange -> {-0.012, 0.012},
AxesLabel -> {"label 1", "label 2"}]

Is it possible to move "label 2" such that it stands right above the
vertical axis? I.e., I want to move "label 2" to the left. The
position of "label 1" is perfect.

Best regards,
Jimmy.

--
Alexei Boulbitch, Dr., habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.

```
 0
Alexei
4/19/2010 9:58:52 AM

Web resources about - Change position of axes label - comp.soft-sys.math.mathematica

Squatting position - Wikipedia, the free encyclopedia
Squatting is a posture where the weight of the body is on the feet (as with standing ) but the knees are bent either fully (full or deep squat) ...

A Jack Of All Cabinet Positions
This guy has had a lot of jobs.

Jimmy Carter: Trump best GOP candidate because he has 'no fixed positions'
"I think I would choose Trump, which may surprise some of you," the former Democratic president said during an appearance at Britain's House ...

Agent's Take: How the 2016 Super Bowl teams spend on each position
How do the Panthers and Broncos match up financially at each position?

Benjamin Millepied left his position at Paris de Opera after just 15 months
... own drama at Opera de Paris, where he served as dance director since late 2014. On Thursday, Millepied announced that he was leaving his position ...

The Position Has Been Filled
Submitted by: (via cat gif central ) Tagged: dogs , gifs , kitten , cuddles , Cats Share on Facebook

Zika tests Catholic position on birth control
Zika-infected mosquitoes aren't just causing medical problems, they're creating a theological conundrum for the Catholic church

Rubio Reverses Debate Position, Says He’ll Co-Sponsor Bill To Ban Drafting Women
'Senator Rubio agrees with Senator Lee that Congress needs to determine the future of the Selective Service system'

Viacom Names Philippe Dauman Chairman After Shari Redstone Rejects Position
Viacom Names Philippe Dauman Chairman After Shari Redstone Rejects Position

Cisco Systems, Inc. (CSCO) Position Decreased by Atlas Brown Inc.
Bull Report Cisco Systems, Inc. (CSCO) Position Decreased by Atlas Brown Inc. EMQ Cisco Systems logo Atlas Brown Inc. reduced its position ...

Resources last updated: 2/12/2016 4:30:52 AM