meta data for this page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tectonicwaters:gplates_coloring_features_by_absolute_age [2017/01/09 16:49] christiantectonicwaters:gplates_coloring_features_by_absolute_age [2019/08/24 09:06] (current) – Discussion status changed christian
Line 19: Line 19:
 When you now start reconstructing your feature data, the colouring should remain static at any moment in your reconstruction. See this absolute reconstruction sequence for the western Pacific area at 0, 50, 100 and 150 Ma: When you now start reconstructing your feature data, the colouring should remain static at any moment in your reconstruction. See this absolute reconstruction sequence for the western Pacific area at 0, 50, 100 and 150 Ma:
  
-{{gallery> :tectonicwaters:gplates20_colorbyproperty_gts-absage_reconstruction*0ma.png?nolink |}}+{{gallery>:tectonicwaters?gplates20_colorbyproperty_gts-absage_reconstruction*ma.png?200x200&lightbox&cache}} 
 + 
 +==== Update ==== 
 + 
 +After [[http://mailman.sydney.edu.au/pipermail/gplates-discuss/2017-January/000583.html|emailing the gplates-discuss mailing list]], [[http://mailman.sydney.edu.au/pipermail/gplates-discuss/2017-January/000584.html|John Cannon provided]] the following, tuned script to use absolute age colouring. This script also needs to be placed in one of the scripts directories (ideally the GPlates default script directory) and simplifies the colouring by absolute age by one step - it is no longer necessary to call the attribute directly as by default the ''FROMAGE'' attribute is used. 
 + 
 +<file python AbsoluteAge.py> 
 +''' 
 +Script sent to gplates-discuss mailinglist by John Cannon on 2017-01-11. 
 +See: http://mailman.sydney.edu.au/pipermail/gplates-discuss/2017-January/000584.html 
 + 
 +''' 
 + 
 +import pygplates 
 + 
 +class AbsoluteAge: 
 + def __init__(self): 
 + pass 
 +  
 + def get_style(self, feature, style): 
 + absolute_age = feature.begin_time() 
 + style.colour = self.cfg['Palette'].get_color(pygplates.PaletteKey(absolute_age)) 
 +  
 + def get_config(self): 
 + self.cfg_dict = {} 
 + self.cfg_dict['Palette/type'] = 'Palette' 
 + return self.cfg_dict 
 +  
 + def set_config(self, config): 
 + self.cfg = config 
 + 
 +  
 +def register(): 
 + pygplates.Application().register_draw_style(AbsoluteAge()) 
 + 
 +</file>
  
-{{ :tectonicwaters:gplates20_colorbyproperty_gts-absage_reconstruction50ma.png?nolink |}} 
-{{ :tectonicwaters:gplates20_colorbyproperty_gts-absage_reconstruction100ma.png?nolink |}} 
-{{ :tectonicwaters:gplates20_colorbyproperty_gts-absage_reconstruction150ma.png?nolink |}} 
  
 ==== Color by property ==== ==== Color by property ====
Line 85: Line 117:
  
  
-~~DISCUSSION~~+~~DISCUSSION:closed~~