Same symbology and color for all attributes of layer in QGIS

polygonqgissymbologyvisualisation

In QGIS 3.22.0 (Bialowieza) I have a polygon layer with different attributes.

I'm making a categorized map for each attribute in my table. For that I'm duplicating and renaming my layer corresponding to the attributes I want displayed. All attributes always have the values 0,1,2 or 3. The layers mostly have 2-3 values, but sometimes all 4.

I would like the value to correspond to the same color in each cateogrized map. I thought if I saved the style of the classification I could load it, when I want to display the next attribute. Unfortunately, when I save a style, it saves the value of the attribute with it. Meaning, that when I move on to the next value and load the style, it jumps back to my previous value.

Is there a possibility to save the style and use it for each value?

In the first Image you see my layer with 9 different attributes
enter image description here

For each attribute I would like to create its own map
enter image description here

Since all layers have the values 1,2,3 or 0, I would like all symbols to have the same color through out the 9 maps. Unfortunately I have to manually classify and change the colors of the symbols for every attribute
enter image description here

Best Answer

This is where the feature "Match to Saved Symbols" (and "Match to Symbols from File...") comes in handy.

To use this feature, you need to create styles in the Style Manager that have the same name as the attribute values you want to assign them to. In your case, you need styles called "0", "1", "2", and "3":

"Style Manager"

You can either create the required styles in the Style Manager, or you can save the styles from the Layer Styling panel:

"Layer Styling" panel

To apply these styles to your other layers, you select "Advanced"/"Match to Saved Symbols" in each layer's "Layer Styling" panel.

"Layer styling" panel with "Advanced" dropdown opened

If you want to change the style for one of the values later on, you edit the style in the Style Manager (not in the Layer Styling panel), and then re-run "Match to Saved Symbols" for each of your layers.