User Tools

Site Tools


internal:administration:idl

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
internal:administration:idl [2025/11/27 11:56] – [general structure] janinternal:administration:idl [2026/03/19 20:55] (current) – [contour] jan
Line 3071: Line 3071:
   extrm_lev_max = +(machar()).xmax   extrm_lev_max = +(machar()).xmax
      
-See function [[https://www.harrisgeospatial.com/docs/machar.html|function machar]].+See function [[https://www.nv5geospatialsoftware.com/docs/MACHAR.html|function machar]].
  
  
Line 3087: Line 3087:
     /overplot     /overplot
  
-Keyword c_annotations is used here toprovide a format - this is usually not necessary.+Keyword c_annotations is used here to provide a format - this is usually not necessary.
 You can define also different thicknesses, colors etc. with the other %%c_...%% key words of %%contour%%  You can define also different thicknesses, colors etc. with the other %%c_...%% key words of %%contour%% 
 see [[http://www.physics.nyu.edu/grierlab/idl_html_help/C40.html#wp908085| help for contour]]. see [[http://www.physics.nyu.edu/grierlab/idl_html_help/C40.html#wp908085| help for contour]].
 +
 +=== line patterns ===
 +
 +contour can draw hatch patterns - but note: the pattern is not transparent.
 +
 +  contour, z, x, y, $
 +    levels = levels, $
 +    c_orientation = [ 0 , 22, 45, 90, ... ] , $ ; orientation of the lines in degrees
 +    c_spacing = [ 1, 0.5, 0.25, ... ] ; spacing between lines in cm
 +    
 +
 +=== Path of contour lines ===
 +
 +contour can provide the pathes of the contour lines:
 +
 +  contour, z, x, y, $
 +    levels = levels, $ 
 +    path_info = path_info, $ ; info about the provided pathes (see below). If you provide here a variable contour will not draw.
 +    path_xy = path_xy, $ ; variable for coordinates: fltarr(2,N_tot)
 +    /path_data_coords, $ ; want to have data coordinates in data_xy instead of normalized coo's.
 +    /path_double, $ ; you need double if eg x is time as julian day
 +    /overplot ; avoid contour to rescale the axes - if you already had a plot or contour plot you want to reuse
 +
 +path_info is an array of CONTOUR_PATH_STRUCTURE. The number of elelemtns gives the number of sub pathes.
 +Elements %%offset%% and %%N%% give the starting index and length of every isoline in path_xy.
 +
 +You can then use the pathes in poly_fill to do transparent hatch patterns: 
 +
 +  for i = 0, n_elements(path_info)-1 do begin
 +    path_info_i = path_info[i]
 +    ii = path_info_i.offset + lindgen(path_info_i.N)
 +    polyfill, path_xy[0,ii], path_xy[1,ii], /line_fill, spacing=0.7, orientation=i*5, noclip=0
 +  endfor ; i
 +
 +You could also use polyfill to put a byte pattern or wrap an image between the isolines ...
  
  
 === color bar === === color bar ===
  
-You can use contour also to make a **color bar**:+You may want to have a color bar setting the colorshading in relation to values. 
 +You can use contour to make a **color bar**:
  
 A **horizontal** color bar at the bottom A **horizontal** color bar at the bottom
internal/administration/idl.1764244570.txt.gz · Last modified: by jan