This can be achieved using an agregate function. In this case the expression is:
Two notes on this. (1) Most of the credit goes to Ujaval Gandhi thanks to this blog entry. (2) I find it a bit counter-...
You don't need to consider the page name or number. Since the layer you are trying to dynamically style is the same as the coverage layer, you can use the following expression:
$id = @atlasfeatureid
$id is a function that returns the id of each feature of the current layer.
@atlasfeatureid is a variable that stores the id of the current atlas feature.
This does appear to be a bug but I think I stumbled across a work around.
If you change the Space between symbols to less then 1 mm it will not do the weird bump to 3 and 1 in a column instead of 2 thing.
Here it is at 1mm
And here it is at .99mm
I assume you already figured out that you need to hide your item and group titles and just use your main ...
I had this issue and the cause was the shape file for the atlas being on a shared drive and my computer disconnecting from the shared drive via VPN. I just had to re-add the file from the shared location and it worked fine. To prevent this from happening I just have to close QGIS before I disconnect from the VPN.
You need to select the items from the layout itself and then go to the main menu -> Item -> Group, and it will group the items selected.
The following animation will make it clear on how to group items:
I don't have a solution yet for batch symbolization but if you have symbolized each variable, here is a script that will loop through the selected layers turning each off printing to a pdf & then turning it off. I shouldn't be too difficult to change the pdf to a png.
selected_layers = qgis.utils.iface.layerTreeView()....
The answers by @JGH and @Gabriel Bragion didn't work for me because abs() refused to parse "0,00" (because comma is not a valid separator for a floating point number)
Reordering helps (first abs() then format_number()), as done below:
format_number( abs(@grid_number) ,2)
|| ' °'
WHEN @grid_axis = 'x'
You can use the following to achieve what you want
project = QgsProject.instance()
manager = project.layoutManager()
layout = manager.layoutByName('layout1') # It's an existing layout we search by name
You can add as many pages as you wish to your atlas and design each accordingly to your need. If you want to have a first page with the title and a second page with an overview map (not controlled by atlas) and starting from page 3 your atlas, just add a first page with text only and a second page with a new map element. Here, just don't activate the "...
This is a bit old. But for people looking for the answer, this is now handled by a report rather than a map composition.