Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

If I want to label the $x$-axis of a ListLinePlot , how do I do that?

There are two types of label:

  • a units label which would go to the right of the axis,

and then potentially you could have an

  • axis label below it.

What would be the way to enter both types of text?

share|improve this question
    
ListLinePlot[RandomReal[1, 6], AxesLabel -> {"meter\ndistance", "y"}] ? –  Szabolcs Jan 16 at 17:09

2 Answers 2

up vote 2 down vote accepted

Labeled is quite short solution:

Labeled[ListLinePlot[RandomReal[1, 6], AxesLabel -> {"x", "y"}], 
        {"x label", "y label"}, 
        {Bottom, Left}, RotateLabel -> True]

enter image description here

share|improve this answer

Try this:

   Row[{
  Rotate[Style["Second label Y", 16, Bold], 90 Degree],
  Spacer[10],
  Column[{
    ListLinePlot[RandomReal[1, 6], 
     AxesLabel -> {Style["x", 16, Italic], Style["y", 16, Italic]}, 
     ImageSize -> 350],
    Style["Second label X", 16, Bold]
    }, Alignment -> Center]
  }]

You should obtain something of this sort: enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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