Fisheries and Oceans Canada / Pêches et Océans Canada - Government of Canada / Gouvernement du Canada Fisheries and Oceans Canada / Pêches et Océans Canada - Government of Canada / Gouvernement du Canada
 
Français Contact Us Help Search Canada Site
Home What's New DFO National Site Map Media

Fisheries & Oceans
 
 
Maritimes Region
Fishing Industry
General Public
Marine & Oceans Industry
Media
Students and Teachers
Scientists and Researchers
 
AconIcon ACON       Home/Topics   |   Commands

Graph Limits


The graph limits commands include:
Data Window, Data Viewport, Locate Window, Locate Viewport, List Projections, Zoom Window, Data Projection, and Illustrator Window


Data Window

This command specifies the visible boundaries of the user data. The data to be viewed (commonly geographic data using longitude, latitude coordinates) is presented within some axis boundaries. For example, the user may wish to view geographic data within the area of 64_W - 60_W and 42_N - 45_N; or business data within the years 1970 - 1988 and growth 0% - 30%. Note that when using longitude values in the Northwest Atlantic, the values entered should be negative, to indicate coordinates west of the Greenwich meridian.

The position of these coordinates when transferred to the page is given by the page coordinates as specified by the Data viewport. The combined interaction between the data window and data viewport determines the scale and absolute size of the graphics on the plot.

There are 4 parameters:
x min - the minimum x value in users units (left edge)
x max - the maximum x value in users units (right edge)
y min - the minimum y value in users units (bottom edge)
y max - the maximum y value in users units (top edge)

Data_Window(x min,x max,y min,y max);

Data_Window(-64,-60,42,45.625);

initial program state - -68.0,-59.0,43.0,48.0

See the example Data Points and Labels

affects all subsequent drawing commands.


Data Viewport

This command is used to specify the position of the boundaries of the axes on the page. The data to be viewed (commonly geographic data using longitude, latitude coordinates) is presented within some axis boundaries. For example, the user may wish to view geographic data within the area of 64_W - 60_W and 42_N - 45_N and have this area fit inside a 150 x 100 mm rectangle on the page with a lower left corner at (30, 50) mm from the lower left corner of the page. The position of these coordinates when transferred to the page are 30 180 50 150 (in mm).

There are 4 parameters:
x min - the minimum x position in NDC units (left edge)
x max - the maximum x position in NDC units (right edge)
y min - the minimum y position in NDC units (bottom edge)
y max - the maximum y position in NDC units (top edge)

Drawing nominally occurs on a page which is 8.5 inches x 11 inches in size. Coordinates are usually addressed using a Normalized Device Coordinate (NDC) space which ranges from 0 - 1. (see Coordinate Conversion).

Data_Viewport(page x min,page x max,page y min,page y max);

Data_Viewport(mm(30),mm(189),mm(50),mm(150));

initial program state - =50.0,180.0,43.0,48.0mm

See the example Data Points and Labels

affects all subsequent drawing commands.


Locate Viewport

This command is used to specify the position of the boundaries of the axes on the page, and is the graphic method of issuing the Data_Viewport() command.

The data to be viewed (commonly geographic data using longitude, latitude coordinates) is presented within some axis boundaries. For example, the user may wish to view geographic data within the area of 64_W - 60_W and 42_N - 45_N and have this area displayed inside a particular rectangular region of the page.

The cursor is changed to a +, while the program waits for the user to click and hold the mouse button down while dragging over the graph window to create a rectangle on the screen. This rectangle specifies the position where the axis would be placed (when plotted using the Axis () command). The coordinates of the rectangle are calculated, and a Data_Viewport command is issued using these coordinates (in mm units).

Locate_Viewport();


List Projections

This command gives the list of keywords that are documented in Data Projection.
This command needs no arguments.

List_Projections();


Locate Window

This command is used to specify the boundaries of the axes in user units, and is the graphic method of issuing the Data_Window() command.

The data to be viewed (commonly geographic data using longitude, latitude coordinates) is presented within some axis boundaries. For example, the user may wish to view geographic data within the area of 64_W - 60_W and 42_N - 45_N and have this area displayed inside a particular rectangular region of the page.

The cursor is changed to a +, while the program waits for the user to click and hold the mouse button down while dragging over the graph window to create a rectangle on the screen. This rectangle specifies the new limits of the plot in user units, and may be larger or smaller than the current window. The coordinates of the rectangle are calculated, and a Data_Window command is issued using these coordinates (in user units).

Locate_Window();


Zoom Window

This command is used to 'zoom' in or out by adjusting the boundaries of the axes in user units.

There is 1 parameter:
zoom factor - the factor by which to increase/decrease the viewable area ( factors > 1 zoom out, factors < 1 zoom in).

Zoom_Window(factor);

Zoom_Window(2.5);


Data Projection

This command specifies the type of projection for scaling the user data to fit within the page viewport. The default projection established during program initialization is "NIL".

There is 1 parameter:
projection - the type of data projection to use when transforming user coordinate data to NDCs. The projection types are: "Mercator", "Nil", or alternate extended projections parameter strings.

"Nil" projection removes any data projection so that the scaling implied by the correspondence between the user window and viewport is applied exactly. This is likely less preferable for plotting geographic data, but the best strategy for plotting "business" variables.

The Nil projection may be used for the plotting of non-geographic continuous variables (e.g. temperature vs salinity) for which no projection is required.

Note: - A word about continuous and discrete variables. Plotting continuous surface contours when the x and y axes represent discrete variables such as product number vs market category, will result in an inappropriate graphic. Use other graphic techniques for discrete variables.

Specific projection formulas exist to project the earth's spherical surface onto a flat, two-dimensional surface. When using the extended projections, the parameter includes enough information to define such things as the shape of the earth being assumed (spherical or ellipsoid), and reference points for the projection.

Any representation of the earth's surface in two dimensions distorts the shape of objects, and area, distance, or direction calculations. As different projections produce different distortions, care should be taken when combining data from different data sources and possibly different original projection parameters (dataum). Currently there are no routines in ACON to convert data from one datum to another.

Note that when the simple Mercator or extended projections are used, the boundaries of the user data may be adjusted to establish an appropriate scale for both axes (see Data_Window).

The standard 'NIL' or 'Mercator' projections in ACON do not interpolate between data points of vectors drawn. Thus when you draw a line, the 2 endpoints are positioned correctly (for the projection parameters) but the line between the points is drawn as a simple vector. This is a historical artifact from the initial versions of ACON for performance reasons, where lines were assumed to be short vectors (e.g. overlays) on small scale maps.

Extended Data Projections

ACON contains an implementation of the PROJ library as described in the United States Department of the Interior Geological Survey "Cartographic Projection Procedures for the UNIX Environment - A users's Manual" by Gerald I. Evenden, Open-File Report 90-284, and (at the time of this writing) available as the PROJ.4 - Cartographic Projections Library from http://www.remotesensing.org/proj/

These routines provide precise control of the projections, at the expense of a necessarily somewhat more complicated set of parameters. The parameters are supplied as a character string.

When extended data projections are used, straight line vectors [when drawing data in user units, e.g. Overlay_RANGS()] are automatically projected using interpolated intermediate points, so as to create smooth continuous curves. Similarily, the User_Proj command may be used to generate interpolated intermediate points in NDC units.

The parameters include (excerpted from the "Cartographic Projection Procedures for the UNIX Environment - A users's Manual"):
proj=name - selects the cartographic transformation identified by name. This parameter is always required for the extended projections.
R=R - specifies that the projection should be computed as a spherical Earth with radius R.
ellps=acronym - specifies a standard predefined ellipsoid figure. For spherical only projections, the major axis is used as the radius.
a=a - specifies an elliptical Earth's major axis a.
es= - defines the elliptical Earth's squared eccentricity. Optionally, either b=b, e=e, rf=1/f, or f=f may be used where b, e and f are respective minor axis, eccentricity and flattening.
R_A - must be used with elliptical Earth parameters. It determines that spherical computations be used with the radius of a sphere that has a surface area equivalent to the selected ellipsoid. R_V can be used in a similar manner for sphere radius of an ellipse with equivalent volume.
R_a - must be used with elliptical Earth parameters. Spherical radius of the arithmetic mean of the major and minor axis axis is used. R_g and R_h can be used for equivalent geometric and harmonic means of major and minor axis.
R_lat_a=theta - must be used with elliptical Earth parameters. Spherical radius ofthe arithmetic mean of the principle radii of the ellipsoid at latitude theta is used. R_lat_g=theta can be used for equivalent geometric mean of the principle radii.
x_0=x0 - false easting; added to x value of the cartesian coordinate. Used in grid systems to avoid negative grid coordinates.
y_0=y0 - false northing; added to y value of the cartesian coordinate. Used in grid systems to avoid negative grid coordinates.
lon_0=lambda0 - central meridian. Along with lat_0, normally determines the geographic origin of the projection.
lat_0=theta0 - central parallel. See lon_0.
geoc - data geographic coordinates are to be treated as geocentric when this option is specified.
over - inhibit reduction of input longitude values to a range within ± 180° of the central meridian.
Cylindrical Projections
MERC Mercator - Inv
TMERC Transverse Mercator - Inv
UTM Universal Transverse Mercator - Inv
OMERC Oblique Mercator - Inv
CC Central Cylindrical - Inv
MILL Miller - Inv
CEA Cylindrical Equal Area - Inv
GALL Gall (Stereographic) - Inv
TCEA Transverse Cylindrical Equal Area - Inv
EQC Equidistant Cylindrical - Inv
CASS Cassini - Inv
Pseudocylindrical Projections
SINU Sinusoidal - Inv
MOLL Mollweides - Inv
ROBIN Robinson - Inv
ECK1 Eckert I - Inv
ECK2 Eckert II - Inv
ECK3 Eckert II - Inv
ECK4 Eckert IV - Inv
ECK5 Eckert V - Inv
ECK6 Eckert VI - Inv
LOXIM Loximuthal - Inv
MBTFPP McBryde-Thomas Flat-Polar Parabolic - Inv
MBTFPQ McBryde-Thomas Flat-Polar Quartic - Inv
MBTFPS McBryde-Thomas Flat-Polar Sinusoidal - Inv
PUTP2 Putnins P2' - Inv
PUTP5 Putnins P5 - Inv
WINK1 Winkel I - Inv
COLLG Collignon - Inv
Conic Projections
LCC Lambert Conformal Conic - Inv
EQDC Equidistant Conic - Inv
AEA Albers Egual Area - Inv
LEAC Lambert Equal Area Conic - Inv
BIPC Bipolar Conic - Inv
POLY Polyconic (American) - Inv
BONNE Bonne - Inv
Azimuthal Projections
STERE Stereographic - Inv
GNOM Gnomonic - Inv
ORTHO Orthographic - Inv
LAEA Lambert Azimuthal Equal Area - Inv
AEQD Azimuthal equidistant - Inv
Miscellaneous Projections
VANDG Van der Grinten I
TPEQD Two Point Equidistant
Predefined Ellipsoids
MERIT a=6378137.0, rf=298.257, MERIT 1983,
SGS85 a=6378136.0, rf=298.257, SGS 85,
GRS80 a=6378137.0, rf=298.257222101, GRS 1980(IUGG, 1980),
IAU76 a=6378140.0, rf=298.257, IAU 1976,
airy a=6377563.396, b=6356256.910, Airy 1830,
APL4.9 a=6378137.0., rf=298.25, Appl. Physics. 1965,
NWL9D a=6378145.0., rf=298.25, Naval Weapons Lab., 1965,
mod_airy a=6377340.189, b=6356034.446, Modified Airy,
andrae a=6377104.43, rf=300.0, Andrae 1876 (Den., Iclnd.),
aust_SA a=6378160.0, rf=298.25, Australian Natl & S. Amer. 1969,
GRS67 a=6378160.0, rf=247.247167, GRS 67(IUGG 1967),
bessel a=6377397.155, rf=299.1528128, Bessel 1841,
bess_nam a=6377483.865, rf=299.1528128, Bessel 1841 (Namibia),
clrk66 a=6378206.4, b=6356583.8, Clarke 1866,
clrk80 a=6378249.145, rf=293.4663, Clarke 1880 mod.,
CPM a=6375738.7, rf=334.29, Comm. des Poids et Mesures 1799,
delmbr a=6376428., rf=311.5, Delambre 1810 (Belgium),
engelis a=6378136.05, rf=298.2566, Engelis 1985,
evrst30 a=6377276.345, rf=300.8017, Everest 1830,
evrst48 a=6377304.063, rf=300.8017, Everest 1948,
evrst56 a=6377301.243, rf=300.8017, Everest 1956,
evrst69 a=6377295.664, rf=300.8017, Everest 1969,
evrstSS a=6377298.556, rf=300.8017, Everest (Sabah & Sarawak),
fschr60 a=6378166., rf=298.3, Fischer (Mercury Datum) 1960,
fschr60m a=6378155., rf=298.3, Modified Fischer 1960,
fschr68 a=6378150., rf=298.3, Fischer 1968,
helmert a=6378200., rf=298.3, Helmert 1906,
hough a=6378270.0, rf=297., Hough,
intl a=6378388.0, rf=297., International 1909 (Hayford),
krass a=6378245.0, rf=298.3, Krassovsky, 1942,
kaula a=6378163., rf=298.24, Kaula 1961,
lerch a=6378139., rf=298.257, Lerch 1979,
mprts a=6397300., rf=191., Maupertius 1738,
new_intl a=6378157.5, b=6356772.2, New International 1967,
plessis a=6376523., b=6355863., Plessis 1817 (France),
SEasia a=6378155.0, b=6356773.3205, Southeast Asia,
walbeck a=6376896.0, b=6355834.8467, Walbeck,
WGS60 a=6378165.0, rf=298.3, WGS 60,
WGS66 a=6378145.0, rf=298.25, WGS 66,
WGS72 a=6378135.0, rf=298.26, WGS 72,
WGS84 a=6378137.0, rf=298.257223563, WGS 84,

Data_Projection("projection");

Data_Projection("NIL");

Data_Projection("Mercator");

Data_Projection("proj=LAEA lon_0=67.0w lat_1=43n lat_2=45n ellps=clrk66 R_A");

initial program state - "NIL"

See the example Data Points and Labels

affects all subsequent drawing commands.


Data Window scale

When Mercator projection is used (NOT the default projection) then a fixed relationship between the scales in the x axis and y axis is created. It is possible that the user coordinates supplied by the window command do not fit properly within the viewport boundary to create a true Mercator projection.

To correct scale error, the program will, during graphic output, recalculate the user data boundaries, with the result that either the maximum longitude or maximum latitude value which was specified, will be altered to a larger value (further east or north) to preserve the scale in both the x and y axes. The size of the plot, and position on the page will remain unaltered.


Illustrator Window

This command is used to establish the window/viewport relationship implicit in an Illustrator "Base Map". The Illustrator document is opened and scanned to locate an "ACON message" which contains the Window_Number, Data_Window, Data_Viewport, and Data_Projection commands. The parameters for this command are the window # and Illustrator-document-name.

This is a powerful command which allows the integration of the ACON graphics and Illustrator graphics. The problems which this command addresses are twofold. First, this program is not capable of creating complex professional graphics (especially maps) without significant computing time, and user intervention. Secondly, the application Adobe IllustratorTM is quite capable of producing professional graphics, but the user may be unwilling to locate 500 data points on a map accurately using the mouse, and would likely not want to draw detailed shaded contours using a mouse.

The solution is to use Illustrator to draw good "base maps", developing a library of available maps. Then use this program to read your data and create the data graphics using the illustrator map overlay (or underlay as it may turn out).

This leaves one slight problem - how to match the Illustrator base map document and the Illustrator output file created using ACON? This command solves the dilemma.

Four steps are required:

Step 1 - Beforehand,

To modify an existing image to function as an Illustrator "Base Map"

- you must enter the window, viewport, and projections commands in the Illustrator base map document. This is done by entering a note in a rectangle drawn in Illustrator. Your base map should have a rectangle drawn around its border. It quite likely does, in the form of the axis boundary lines around the map. Using the Paint menu item of Illustrator, place a note or "ACON message" into the note field of the rectangle. The note must use the following form:

Window_Number(windowindex);Data_Window (x min,x max,y min,y max);

Data_Projection(projection);

Window_Number(1);Data_Window(-67,-65.4,42.5,48);

Data_Projection("Mercator");

The example indicates this is the 1st window (multiple windows are permitted), and gives the values for the Window and Projection command parameters.

To create a "Base Map" using ACON

- ACON itself may be used to create the base map in Illustrator format by creating Illustrator output and drawing the base maps and axis from ACON. The Illustrator output file may be enhanced afterwards using Illustrator.

When an Axis command is issued to an Illustrator output file, the Window_Number, Data_Window, and Data_Projection note is automatically added to the Illustrator document so that the file may be used subsequently as a base map automatically.

Before using the base map the subsequently in ACON (as described in Step 2), the file must be opened in Illustrator (and edited if you wish) and saved in Encapsulated PostScript form in Illustrator 1.1 format.

Step 2 - When running ACON, the user can automatically establish the correct Data_Window / Data_Viewport / Data_Projection parameters for an Illustrator base map document by using the Illustrator_Window command. This command will open the Illustrator document immediately, and scan the file to find the ACON message for the matching window. If a matching window is found, the Data_Window and Data_Projection commands are executed. ACON then determines the corresponding values of the Data_Viewport by using the page coordinates of the rectangle itself.

This means Illustrator base map may be uniformly scaled or translated (moved on the page) with the message intact when editing the document in Illustrator. Stretching or any non-uniform scaling of the map will destroy the correspondence between the image and the window if a projection other than NIL is used.

Step 3 - Create a new separate Illustrator output file. You do not have to specify the Data_Window, Data_Viewport, or Data_Projection as the current values established by the Ilustrator_Window command are the appropriate values. Execute only the drawing commands to create the data graphics (and the axis if you don't trust the process), don't bother with the map overlays (assuming they are in the Illustrator document).

Step 4 - Using the Overlay_Illustrator_File command to copy the Illustrator base map from the old Illustrator document to the new document being created (this works for Screen_Output or Illustrator_Output).

For Illustrator_Output you may alternately run Illustrator, opening the base map document, and then the Illustrator output file from ACON. Copy and Paste-in-Front the data graphics from the output file into the base map document. Save the base map as a new file with a DIFFERENT name.

There are 2 parameters:
window index - the number of the window to locate within the Illustrator file.
file name - the name of the Illustrator file to search.

Illustrator_Window(window index,"File name");

Illustrator_Window(1,"C:/ACON/Maps/my_base_map.ai");

See the example Base Maps

affects all subsequent drawing commands.


AconIcon ACON       Home/Topics   |   Commands



Last Modified : 2003-11-19