On Thu, Sep 11, 2014 at 03:53:35PM +0200, Mathias Müller wrote:
> I wanted to adjust the displayed data in my C code with the following 
> approach:
> 
> (...)
> data[1] = gwy_container_new();
> gwy_container_set_object_by_name(data[1], "/0/data", data_field);
> data_view[1] = GWY_DATA_VIEW(gwy_data_view_new(data[1]));
> gwy_data_view_set_data_prefix(data_view[1], "/0/data");
> gwy_container_set_boolean_by_name(data[1], "/0/data/realsquare", TRUE);       
>  
> gwy_container_set_int32_by_name(data[1], "/0/base/range-type", 
> GWY_LAYER_BASIC_RANGE_FIXED);

For range type control, you need to tell also the data display layer
where to look for the settings (omitting some typecasts):

    layer = gwy_data_view_get_base_layer(dataview[1]);
    gwy_pixmap_layer_set_data_key(layer, "/0/data");
    gwy_layer_basic_set_range_type_key(layer, "/0/base/range-type");
    gwy_layer_basic_set_min_max_key(layer, "/0/base");

Look for instance at the neural module:

    
https://sourceforge.net/p/gwyddion/code/HEAD/tree/trunk/gwyddion/modules/process/neural.c#l1593

Regards,

Yeti


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to