This page was created by the IDL library routine `mk_html_help2`.

Last modified: Tue Nov 4 18:16:51 2025.

# Directory Listing of Routines

# projects/themis/spacecraft/particles/slices/plotting

- PLOT_PART_SLICE2D
- THM_PART_SLICE1D_PLOT
- THM_PART_SLICE2D_GETINFO
- THM_PART_SLICE2D_GETTICKS
- THM_PART_SLICE2D_GETTICKS_RLOG
- THM_PART_SLICE2D_PLOT_OLD
- THM_PART_SLICE2D_REMOVEZEROS

# Routine Descriptions

## PLOT_PART_SLICE2D

[Next Routine] [List of Routines]

    Purpose: Notify user that old routine was renamed to follow naming conventions.

    Notes: May be removed in the future

(See projects/themis/spacecraft/particles/slices/plotting/plot_part_slice2d.pro)

## THM_PART_SLICE1D_PLOT

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      thm_part_slice1d_plot.pro

    Purpose:
      Draw the plots for thm_part_slice1d

    Calling Sequence:
      thm_part_slice1d_plot, x, y [,overplot=overplot] [,xrange=xrange] [,yrange=yrange]
                       [,title=title] [,xtitle=xtitle] [,ytitle=ytitle] [,window=window]

    Input:
             x: data's x axis values (km/s, eV, degrees)
             y: data's y axis values (slice's units)
      overplot: flag to add the trace to the previous plot
        xrange: range to force the x axis to
        yrange: range to force the y axis to
        window: index of the plotting window to be used
         title: plot title
        xtitle: x axis title
        ytitle: y axis title

      *IDL graphics keywords passed through _extra were supercede any
       keywords explicitly set in the calls to plot and oplot.
       Depending on the circumstance one may wish to:
         -add the keyword to this routine to allow it to be filtered
         -strip the option from the _extra structure

    Output:
      None, produces plot.

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-04 18:05:22 -0800 (Fri, 04 Mar 2016) $
    $LastChangedRevision: 20331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/slices/plotting/thm_part_slice1d_plot.pro $

(See projects/themis/spacecraft/particles/slices/plotting/thm_part_slice1d_plot.pro)

## THM_PART_SLICE2D_GETINFO

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      thm_part_slice2d_getinfo

    Purpose:
      Helper function for thm_part_slice2d_plot.
      Forms various title annotations based on the slice's metadata.

    Input:
      slice: 2D slice structure from thm_part_slice2d

    Output:
      title: (string) Title to appear at the top of the plot.
      subtitle: (string) Subtitle appearing below TITLE.
      xtitle: (string) Title for x axis.
      ytitle: (string) Title for y axis.
      ztitle: (string) Title for z axis.

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-04 18:05:22 -0800 (Fri, 04 Mar 2016) $
    $LastChangedRevision: 20331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_getinfo.pro $

(See projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_getinfo.pro)

## THM_PART_SLICE2D_GETTICKS

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      thm_part_slice2d_getticks

    Purpose:
      Helper function for thm_part_slice2d_plot.
      Return an array of formatted annotation strings to be passed
      to an IDL plotting procedure through the [xyz]tickname keyword.

    Input:
      nticks: (int) # of ticks requested by user (optional)
      range: (float) two element array specifying axis range
      log: (bool/int) flag to denote logarithmic axis, this should always
                      be set to avoid persistence of the last axis setting
      precision: (int) number of significant digits for annotation
      style: (int) type of numberical annotation (0=auto, 1=decimal, 2=sci)

    Output:
      tickname: (string) Array of tick names
      tickv: (float) Array of tick values
      ticks: (int) Number of ticks - 1

    Notes:
      - This function should be called after the plot window has been initialized;
        otherwise, the AXIS procedure will create an extra window.
      - If the # of ticks is not specified it will be determined by IDL.
      - Associated tick values are returned via keyword (2013-April)

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-04 18:05:22 -0800 (Fri, 04 Mar 2016) $
    $LastChangedRevision: 20331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_getticks.pro $

(See projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_getticks.pro)

## THM_PART_SLICE2D_GETTICKS_RLOG

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      thm_part_slice2d_getticks_rlog

    Purpose:
      Helper function for thm_part_slice2d_plot.
      Return an array of formatted annotation strings to be passed
      to an IDL plotting procedure through the [xyz]tickname keyword.

    Input:
      range: (float) two element array specifying axis range
      precision: (int) number of significant digits for annotation
      style: (int) type of numberical annotation (0=auto, 1=decimal, 2=sci)
      nticks: (int) # of ticks requested by user, this will only be used
              if the axis range is less than 1 order of magnitude (optional)

    Output:
      tickname: (string) Array of tick names
      tickv: (float) Array of tick values in normalized/shift log space
      ticks: (int) Number of ticks - 1

    Notes:
      - This function should be called after the plot window has been initialized;
        otherwise, the AXIS procedure will create an extra window.
      - If the axis range is less than 1 order in log space then IDL will determine ticks.

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-04 18:05:22 -0800 (Fri, 04 Mar 2016) $
    $LastChangedRevision: 20331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_getticks_rlog.pro $

(See projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_getticks_rlog.pro)

## THM_PART_SLICE2D_PLOT_OLD

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      thm_part_slice2d_plot_old

    Purpose:
      Create plots for 2D particle slices produced with thm_part_slice2d_old

    Calling Sequence:
      thm_part_slice2d_plot, slice

    Arguments:
      SLICE: 2D array of values to plot

    Plotting Keywords:
      LEVELS: Number of color contour levels to plot (default is 60)
      OLINES: Number of contour lines to plot (default is 0)
      ZLOG: Boolean indicating logarithmic countour scaling (on by default)
      ECIRCLE: Boolean to plot circle(s) designating min/max energy
               from distribution (on by default)
      SUNDIR: Boolean to plot the projection of scaled sun direction (black line).
              Requires GET_SUN_DIRECTION set with thm_part_dist_array.
      PLOTAXES: Boolean to plot x=0 and y=0 axes (on by default)
      PLOTBULK: Boolean to plot projection of bulk velocity vector (red line).
                (on by default)
      PLOTBFIELD: Boolean to plot projection of scaled B field (cyan line).
                  Requires B field data to be loaded and specified to
                  thm_part_slice2d with mag_data keyword.

      CLABELS: Boolean to annotate contour lines.
      CHARSIZE: Specifies character size of annotations (1 is normal)
      [XYZ]RANGE: Two-element array specifying x/y/z axis range.
      [XYZ]TICKS: Integer(s) specifying the number of ticks for each axis
      [XYZ]PRECISION: Integer specifying annotation precision (sig. figs.).
                      Set to zero to truncate printed values to inegers.
      [XYZ]STYLE: Integer specifying annotation style:
                 Set to 0 (default) for style to be chosen automatically.
                 Set to 1 for decimal annotations only ('0.0123')
                 Set to 2 for scientific notation only ('1.23e-2')

      WINDOW:  Index of plotting window to be used.
      PLOTSIZE: The size of the plot in device units (usually pixels)
                (Not implemented for postscript).

    Exporting keywords:
      EXPORT: String designating the path and file name of the desired file.
              The plot will be exported to a PNG image by default.
      EPS: Boolean indicating that the plot should be exported to
           encapsulated postscript.

    Created by: A. Flores
                Based on work by Bryan Kerr and Arjun Raj

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-04 18:05:22 -0800 (Fri, 04 Mar 2016) $
    $LastChangedRevision: 20331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_plot_old.pro $

(See projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_plot_old.pro)

## THM_PART_SLICE2D_REMOVEZEROS

[Previous Routine] [List of Routines]

    Procedure:
      thm_part_slice2d_removezeros

    Purpose:
      Helper routine for thm_part_slice2d_plot.
      Removes trailing zeros and/or decimal from string.

      This could probably be repurposed into a general routine.

    Input:
      sval: (string) Numerical string to be modified

    Output:
      return value: (string) copy of input string with trailing
                     zeros and/or decimal removed.

    Notes:
      -Assumes trailing spaces have already been removed.

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-04 18:05:22 -0800 (Fri, 04 Mar 2016) $
    $LastChangedRevision: 20331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_removezeros.pro $

(See projects/themis/spacecraft/particles/slices/plotting/thm_part_slice2d_removezeros.pro)