11

I added two scale elements to my map composition. For layout harmonisation, I want the ticks and the label text below the scale bar.

Standard is this: This is what I get.

What I want is this (manually changed in the image): enter image description here

Is there an option in QGIS for this?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
aae
  • 377
  • 2
  • 12

2 Answers2

15

I don't think there's an option yet which allows you to put the units below the scalebar. An alternative could be to:

  1. Modify your current scalebar and set its Font colour to match the background colour:

    Item Properties > Fonts and colours > Font colour
    
  2. Copy your scalebar and paste it directly below your original scalebar. Then set its Font colour to black and its Line colour to transparent:

    Item Properties > Fonts and colours > Font colour
                                        > Line colour
    
  3. You can then select your scalebars and group them, allowing you to move them easily as if they were one:

    Scalebars

Joseph
  • 75,746
  • 7
  • 171
  • 282
  • 2
    Maybe it is not possible yet doing that because the Labels margin field from the Display Menu doesn't accept negative values. However, nice workaround! – mgri Apr 26 '17 at 13:02
  • 2
    I've used this trick in the past to do two-sided scales (e.g. Nautical miles on one side, Km on the other.) Always need 3 scales for that, one just for labelling downticks, one with uptick scale and labels and one to show downticks only. Messy, but it does the job... – Steven Kay Apr 26 '17 at 13:14
  • 1
    @mgri - If it did accept negative values (which I'm hoping is a simple fix) then that would be very nice indeed =) – Joseph Apr 26 '17 at 13:28
  • @StevenKay - Messy and can be annoying when having to alter the segments for the different scale units to match your requirement :) – Joseph Apr 26 '17 at 13:29
  • Ok, this convinced me in practice even more than @Swod's hack. – aae May 01 '17 at 13:13
5

I don't think it is possible within qgis print composer.

However you can play with a template file to make it work. You can set the distance between the text labels and the scale bar in:

Item properties > Display > Labels margin.

Unfortunately you can't set it to a negative value (= scale bar above the text) within the print composer.

But you can within a template file. Create an empty print composition and within it a scale bar, with the right style etc. Save this as template ("Composer > Save as template"). This will create a *.qpt file. Open this file with a text editor and search for the term "labelBarSpace" and set it to a negative value e.g. -10. (Depending on you font size you'll have to adjust this value.) Within the qgis print composer add this template (Composer > Add Items from Template) and it'll show the numbers below the scale bar.

As long as you don't touch the Item properties > Display > Labels margin - settings it will stay this way. This worked for me with QGIS 2.18.

swad
  • 321
  • 2
  • 5
  • Weird that, obviously, not many people want to have the labels below the line - but your hack is neat. I'm going to give it a shot, even though this means creating multiple templates for different formats (i.e. A0 plots and A4 printouts). – aae Apr 27 '17 at 13:22