7

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!

Apatura
  • 479
  • 1
  • 3
  • 15

2 Answers2

16

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

Apatura
  • 479
  • 1
  • 3
  • 15
7

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

Jens
  • 97,245
  • 7
  • 213
  • 499
  • 1
    That explains it - FrameLabel works for Frame, AxesLabel for Axes, and the two are completely different things. Thanks for your answer! – Apatura Dec 22 '12 at 14:29