CPlotView:PlotImageCol
The PlotImageCol method plots the pixel values along an image column, as a function of y-axis position.
bResult = CPlotView:PlotImageCol( CImage, x, y1, y2, sTitle, sCap, bWcs=false )
|
This method creates a graph of luminance value versus row number for the specified image column. The image coordinates are specified in pixel coordinates even if the plot is to be made using world coordinates (the bUseWcs argument). The x, y1, and y2 arguments specify column and row positions, indexed with the first pixel at 1. If you need to plot from an image position in world coordinates, use the WcsToXy method to convert x, y1, or y2 before calling PlotImageCol.
Example 1: Assume that a CImage I exists. The following script fragment plots column 150 from row 300 through row 499. World Coordinates units are not plotted, since the bWcs value is not specified:
|
-- create a CPlotView |
|
-- define the column and rows to plot |
|
-- title |
|
-- caption |
|
-- plot the column |
Example 2: Suppose an astronomical image is the current image and that it has an equatorial form of world coordinate calibration. The following script fragment plots the image luminance at coordinate (5:20:13.54,-12:15:20.4), over 100 pixels long and aligned in the column (vertical) direction. Since this fragment plots 200 rows, the cursor's column extent is unimportant and we need only to set the number of rows (height):
|
-- create a CPlotView |
|
-- title |
|
-- caption |
|
-- set the center coordinate (right ascension) |
|
-- set the center coordinate (right ascension) |
|
-- position the image cursor |
|
-- check if x inside image |
|
-- make y1 inside the image |
|
-- make y2 inside the image |
|
-- plot the column |
|
|
CPlotView, PlotImageRow, Image Coordinate System, Subpixel Coordinate Definition