MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simple Query

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24722] Re: Simple Query
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 9 Aug 2000 02:31:21 -0400 (EDT)
  • References: <8mdm5n$5nl@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Ken

Here is a trick using Frame that may help

Plot[Sin[x], {x, 0, 2},
    FrameLabel -> {"xlabel", "ylabel"},
    PlotRange -> All,
    Frame -> {True, True, False, False}
    ];

Plot[Sin[x], {x, 0, 2},
    FrameLabel -> {"xlabel", "ylabel"},
    PlotRange -> All,
    Frame -> {True, True, False, False},
    RotateLabel -> False
    ];

This seems OK provided that you want the axes origin to be at the bottom
left.
If this is not the case then the following may give some ideas.

{{xmin, xmax}, {ymin, ymax}} = PlotRange[gr];
{ox, oy} = AbsoluteOptions[gr, AxesOrigin][[1, 2]];

Show[FullGraphics[gr],
    Graphics[{Text["xlabel", {(xmin + xmax)/2, oy - .2}],
        Text["ylabel", {ox - .2, (ymin + ymax)/2}]
        }],
    PlotRange -> {{xmin - .3, xmax}, {ymin - .3, ymax}}];


Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Ken Rice" <kmr1004 at hermes.cam.ac.uk> wrote in message
news:8mdm5n$5nl at smc.vnet.net...
> Dear All,
>
> Does anyone know how to get Axes Labels centered, rather than appearing on
> the ends of axes? The manual talks about 'default' settings but not, so
> far as I can figure, how to change them.
>
> Many thanks
>
> Ken
>
> _____________________________________________________
> Kenneth Rice
> Churchill College              MRC Biostatistics Unit
> Storey's Way                  Inst. of  Public Health
> Cambridge                   Forvie Site, Robinson Way
> CB3 0DS                            Cambridge, CB2 2SR
> Tel: (+44) 01223-517-361          (+44) 01223-330-367
> E-mail: kmr1004 at cam.ac.uk
>
>




  • Prev by Date: RE: A Functional Programming Question
  • Next by Date: Re: Mathematica won't solve simple diff. eqn. system
  • Previous by thread: RE: Simple Query
  • Next by thread: Real roots of polynomials