set_logarithmic
AlexandreBoleve1
Posts: 1 New Member
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)
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
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)
0
Categories
- All Categories
- 302 Community
- 3 Get Started
- 17 Latest Releases
- 16 Member Spotlight
- 42 Learning
- 1.1K Products
- 565 Geology
- 538 Leapfrog
- 1 Volsung
- 26 Visible Geology
- 36 Data Management & Collaboration
- 14 MX Deposit
- 13 Central
- 9 Imago
- 137 Geotechnical
- 137 GeoStudio
- 332 Geophysics
- 321 Oasis montaj
- 1 Workbench
- SPIA
- 10 Res2DInv & Res3DInv
- 3 Evo
- 27 GX Developer