6
$\begingroup$

I simply want to add labels to the axes without using the Drawing Tools menu, I tried this without success:

RegionPlot[x^2 + y < 3, {x, 0, 3}, {y, 1, 3}, AxesLabel -> Automatic]

This does not work either:

RegionPlot[x^2 + y < 3, {x, 0, 3}, {y, 1, 3}, AxesLabel -> {x, y}]

Is there any convenient way of labelling axes in a region plot? Thanks for your help!

$\endgroup$
9
$\begingroup$

Using FrameLabel instead of AxesLabel I get exactly what I want, at least if I disable the automatic rotation and enlarge the font size:

RegionPlot[x^2 + y < 3, {x, 0, 3}, {y, 1, 3}, FrameLabel -> {x, y}, RotateLabel -> False,LabelStyle -> (FontSize -> 20)]

regionplot

$\endgroup$
6
$\begingroup$

Just for completeness, one can also interpret this question as meaning that you want to display axes and label them, instead of displaying a frame and labeling that.

In that case, the answer would be

RegionPlot[x^2 + y < 3, {x, 0, 3}, {y, 1, 3}, AxesLabel -> Automatic, 
 Axes -> True, Frame -> None]

RegionPlot with axes

$\endgroup$
  • $\begingroup$ That explains it - FrameLabel works for Frame, AxesLabel for Axes, and the two are completely different things. Thanks for your answer! $\endgroup$ – Apatura Dec 22 '12 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.