set_logarithmic

Options
AlexandreBoleve1
AlexandreBoleve1 Posts: 1 Calcite Rank Badge
edited February 2023 in GeoStudio
hello,
Does anybody have experience to change linear colorscale to logscale?
I'm trying to set the scale from linear to log from exemple provided by Oasis Montaj here :
https://geosoftgxdev.atlassian.net/wiki/spaces/GXD93/pages/108528042/2D+Views+and+Maps

Trying to use set_logarithmic(min,max,interval) function but without success...
Thank you for your help,
Alex

below part of the script:
with gxgrd.Grid.open(filename_Surfer) as grd:
grid_file_name = grd.file_name_decorated

# create a map for this grid on A4 media, scale to fit the extent
with gxmap.Map.new(file_name+method+' Section',
data_area=grd.extent_2d(),
media="A4",
margins=(1, 3.5, 3, 1),
coordinate_system=grd.coordinate_system,
overwrite=True) as gmap:
map_file_name = gmap.file_name

# draw into the views on the map. We are reopening the map as the Aggregate class only works with a closed grid.
with gxmap.Map.open(map_file_name) as gmap:

# work with the data view, draw a line around the data view
with gxview.View.open(gmap, "data") as v:
# add the grid image to the view, with shading, 20 nT contour interval to match default contour lines
with gxagg.Aggregate_image.new(grid_file_name, shade=True, contour=20) as agg:
gxgroup.Aggregate_group.new(v, agg)

# colour legend
gxgroup.legend_color_bar(v, 'legend',
title=titleUnit,
annotation_height=0.17,
location=(1.2,0),
cmap=agg.layer_color_map(0),
cmap2=agg.layer_color_map(1))

# contour the grid
gxgroup.contour(v, 'contour', grid_file_name)