[GRASS-dev] New histogramming tool for GRASS 7

Michael Barton Michael.Barton at asu.edu
Thu Sep 22 12:34:37 EDT 2011


At the moment, only the text dialog is the same between Histogram2 and Profile. The options dialog in Profile could be made to work like that in Histogram2, but not the other way around. The raster input dialogs are quite different and probably need to remain so.

Profile works on the assumption of having 3 maps to profile. And it needs code for drawing the profile transect on the map display and creating/modifying segment marker points. 

Histogram2 can have a variable number of maps to histogram (from one theoretically up to the maximum number supported by i.group) and doesn't need  transect drawing code or code for segment markers. Hence, the dictionaries for tracking parameters like line color and width are a bit simpler in Histogram2 (one less level so that the raster name rather than an index number main key) making it easier to keep track of a potentially larger number of raster maps. 

Code for overall plot parameters (e.g., axes, grids, title fonts, etc) are identical across both histogram2 and profile because they use standard PyPlot calls.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Sep 22, 2011, at 9:17 AM, Martin Landa wrote:

>> I also worry about duplication of the code. Ideally
>> histogram.HistFrame and histogram2.HistFrame should have common
>> superclass. Same probably for histogram2.HistFrame and
>> profile.ProfileFrame.
> 
> similar implies for settings dialogs. Goal is to avoid duplication of
> code as much as possible.
> 
> Martin
> 
> -- 
> Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa



More information about the grass-dev mailing list