<div dir="ltr"><div><div><div>Hi,<br><br></div>A feature QGIS provides for some releases now in the styling stuffs is "Match to saved symbols" in the Advanced combobox under the frame that displays classification.<br></div>It requires you to build a set of symbols, naming each symbol as a feature attributes (currently a geol name) and then you classify your layer using the geol name field, select the "Match to saved symbols" item. All your symbology will be pulled from the list you previously build and each symbol matches its class.<br><br></div>see the last tip under <a href="http://docs.qgis.org/2.14/endocs/user_manual/working_with_vector/vector_properties.html#categorized-renderer">http://docs.qgis.org/2.14/endocs/user_manual/working_with_vector/vector_properties.html#categorized-renderer</a> (though not that verbose)<br><div><br></div><div>HTH,<br></div><div>Harrissou<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-17 11:51 GMT+01:00 alvarets <span dir="ltr"><<a href="mailto:alvarets@yandex.ru" target="_blank">alvarets@yandex.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi!</div><div><div>Can you show an example?</div><div>Screenshot?</div><div>Curious.</div></div><div> </div><div>17.11.2016, 19:45, "damien stephens" <<a href="mailto:damien.stephens@gmail.com" target="_blank">damien.stephens@gmail.com</a>>:</div><div class="HOEnZb"><div class="h5"><blockquote type="cite"><div><div><div><div><div><div><div><div>not so simple,<br>If you use the colour function  to set the symbol colours using data defined styles, then use the categorised fields to get the text labels for the symbols, the wrong colours show up on the legend, although they are fine on the map.</div>if you just use a single symbol with the data defined styles you only get one colour in the legend.</div>The trick, and the problem is that although the colours in the r, g  and b fields in the table match the geological type, there is no way for QGIS to make that relationship. It does not know that all of the polygons with the geological type rock1 have the same colour, all that it knows is that each polygon with the same  r,g,and b value are colour x. it doesn't use the geological type at all to make this determination.<br> </div>tough problem</div>I thought you could try to  categorise it by the colour rgb  function then change it to rule based and edit the labels to become the correct geology, but even then the colours in the legend are still going to be wrong and different to the ones on the map.<br> </div>my suggestion would be to put in a change request that the legend colour match the first occurence of the rgb colour for a given rule when using data defined styles.<br> </div>As a work around the only thing i can think of  is to set the colours using the data defined style, apply, then categorise by the geological type and use the colour picker to get the colours right in the legend from the map. I would suggest labelling by the geol type to ensure you have the colours right.<br> </div>thanks<div><div> </div></div></div><div> <div>On Thu, Nov 17, 2016 at 10:59 AM, alvarets <span><<a href="mailto:alvarets@yandex.ru" target="_blank">alvarets@yandex.ru</a>></span> wrote:<blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex">Of course. Just like any other legend.<br><br><br><br>--<br>View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Geological-Legends-tp5296020p5296154.html" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/Geological-Legends-<wbr>tp5296020p5296154.html</a><br>Sent from the Quantum GIS - User mailing list archive at Nabble.com.<br>______________________________<wbr>_________________<br>Qgis-user mailing list<br><a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a></blockquote></div></div></blockquote></div></div><br>______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>