3

What is the default distance between the axis numbers and axis labels in the plots made with pgfplots?enter image description here

1 Answer 1

6

The default distance between the tick labels and the axis labels when using compat=1.3 or later (and thus xlabel near ticks) is 2*inner sep + 2*outer sep = 2*0.3333em + 2*0.5\pgflinewidth.

If you're not using compat=1.3 (or explicitly supply xlabel absolute), the distance between the top of the x label and the x axis is 15pt, and the distance between the horizontal centre of the y label and the y axis is 35pt.

7
  • +1: how did you find this out? studying the source?
    – cmhughes
    Jun 4, 2012 at 16:56
  • ok ! thanks how i can set up this distance: "2*inner sep + 2*outer sep = 2*0.3333em + 2*0.5\pgflinewidth" i use compat=newest
    – Aurelius
    Jun 4, 2012 at 17:16
  • @FormlessCloud: The distance is set up automatically when you use compat=newest.
    – Jake
    Jun 4, 2012 at 17:17
  • even if I manually changed the distance from the grid of the tick labels with this command: yticklabel shift = 2pt xticklabel shift = 2pt ?
    – Aurelius
    Jun 4, 2012 at 17:21
  • 1
    @FormlessCloud: Yes, if you use compat=newest and you have a version of PGFplots >= 1.3 then the distance between the tick labels and the axis labels will be kept automatically.
    – Jake
    Jun 4, 2012 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .