# Change colour scheme for individual features with PyGPlates

**URL:** <https://discourse.gplates.org/t/change-colour-scheme-for-individual-features-with-pygplates/152>\
**Category:** Q&A\
**Created:** [30 July 2020 12:59 UTC](https://discourse.gplates.org/t/change-colour-scheme-for-individual-features-with-pygplates/152 "2020-07-30T12:59:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabrice](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/f/5fc32e/32.png) [@Fabrice](https://discourse.gplates.org/u/Fabrice)\
**Post date:** [30 July 2020 12:59 UTC](https://discourse.gplates.org/t/change-colour-scheme-for-individual-features-with-pygplates/152/1 "2020-07-30T12:59:59Z")

</div>

Hi all,

I know “we can only change the colour scheme for all features, not individual features”  
I wonder if someone has tried to symbolize a shapefile by any fields of attribute table with Python ?

Many thanks

Fabrice

---

<div class="post-metadata">

**Author:** ![anon44311652](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@anon44311652](https://discourse.gplates.org/u/anon44311652)\
**Post date:** [30 July 2020 13:21 UTC](https://discourse.gplates.org/t/change-colour-scheme-for-individual-features-with-pygplates/152/2 "2020-07-30T13:21:24Z")

</div>

Hi Fabrice,

If you’re talking about GPlates (rather than pyGPlates), then you might want to check out the Paleogeography tutorial.

Tutorial 2.6 from here: [https://sites.google.com/site/gplatestutorials/](https://sites.google.com/site/gplatestutorials/)

In there I provide an example of how a categorical colour palette can be used to map to a field in a Shapefile visualised in GPlates. Hope it helps!

Sabin

---

<div class="post-metadata">

**Author:** ![john.cannon](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@john.cannon](https://discourse.gplates.org/u/john.cannon)\
**Post date:** [30 July 2020 13:34 UTC](https://discourse.gplates.org/t/change-colour-scheme-for-individual-features-with-pygplates/152/3 "2020-07-30T13:34:04Z")

</div>

Hi Fabrice,

Currently you can colour features by looking up a shapefile attribute in a CPT colour palette.

In the [GPlates tutorials](https://sites.google.com/site/gplatestutorials/), there’s an example in exercise 1b of _Tutorial 2.6: Introduction to Paleogeography_.

Internally it uses a Python colouring script to extract the property from the feature and lookup the colour palette. You can see the script and discussion about that by Christian Heine [here](https://wiki.paleoearthlabs.org/tectonicwaters/gplates_coloring_features_by_absolute_age).

Regards,  
John

---

<div class="post-metadata">

**Author:** ![Fabrice](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/f/5fc32e/32.png) [@Fabrice](https://discourse.gplates.org/u/Fabrice)\
**Post date:** [30 July 2020 14:46 UTC](https://discourse.gplates.org/t/change-colour-scheme-for-individual-features-with-pygplates/152/4 "2020-07-30T14:46:06Z")

</div>

Thank you very much both for time spent and your quick response.  
That’s excatly what I’m looking for.

The best

Fabrice
