functions in graph.i - m
marker
marker= plotting keyword selects the character used for occasional markers along a polyline, or for the polymarker if type is "none". The special values '\1', '\2', '\3', '\4', and '\5' stand for point, plus, asterisk, circle, and cross, which are prettier than text characters on output to some devices. The default marker is the next available capital letter, 'A', 'B', ..., 'Z'. PLOTTING COMMANDS: plg, plc Keyword, defined at i0/graph.i line 1009SEE ALSO: type, width, color, marks, rays, mspace, mphase, msize, mcolor
marks
marks= plotting keyword selects unadorned lines (marks=0), or lines with occasional markers (marks=1). Ignored if type is "none" (indicating polymarkers instead of occasional markers). The spacing and phase of the occasional markers can be altered using the mspace and mphase keywords; the character used to make the mark can be altered using the marker keyword. PLOTTING COMMANDS: plg, plc Keyword, defined at i0/graph.i line 997SEE ALSO: type, width, color, marker, rays, mspace, mphase, msize, mcolor
mcolor
mcolor Keyword, defined at i0/graph.i line 1021SEE mspace
mesh_loc
mesh_loc(y0, x0) or mesh_loc(y0, x0, y, x) or mesh_loc(y0, x0, y, x, ireg) returns the zone index (=i+imax*(j-1)) of the zone of the mesh (X,Y) (with optional region number array IREG) containing the point (X0,Y0). If (X0,Y0) lies outside the mesh, returns 0. Thus, eg- ireg(mesh_loc(x0, y0, y, x, ireg)) is the region number of the region containing (x0,y0). If no mesh specified, uses default. X0 and Y0 may be arrays as long as they are conformable. For mesh_loc wrappers to duplicate the functionality of the digitize and interp functions in 2D, see the library file digit2.i. After #include "digit2.i", type: help,digit2 Builtin function, documented at i0/graph.i line 1352SEE ALSO: plmesh, moush, mouse
mouse
result= mouse(system, style, prompt) displays a PROMPT, then waits for a mouse button to be pressed, then released. Returns array of eleven doubles: result= [x_pressed, y_pressed, x_released, y_released, xndc_pressed, yndc_pressed, xndc_released, yndc_released, system, button, modifiers] If SYSTEM>=0, the first four coordinate values will be relative to that coordinate system. For SYSTEM<0, the first four coordinate values will be relative to the coordinate system under the mouse when the button was pressed. The second four coordinates are always normalized device coordinates, which start at (0,0) in the lower left corner of the 8.5x11 sheet of paper the picture will be printed on, with 0.0013 NDC unit being 1/72.27 inch (1.0 point). Look in the style sheet for the location of the viewport in NDC coordinates (see the style keyword). If STYLE is 0, there will be no visual cues that the mouse command has been called; this is intended for a simple click. If STYLE is 1, a rubber band box will be drawn; if STYLE is 2, a rubber band line will be drawn. These disappear when the button is released. Clicking a second button before releasing the first cancels the mouse function, which will then return nil. Ordinary text input also cancels the mouse function, which again returns nil. The left button reverses forground for background (by XOR) in order to draw the rubber band (if any). The middle and right buttons use other masks, in case the rubber band is not visible with the left button. long(result(9)) is the coordinate system in which the first four coordinates are to be interpreted. long(result(10)) is the button which was pressed, 1 for left, 2 for middle, and 3 for right (4 and 5 are also possible). long(result(11)) is a mask representing the modifier keys which were pressed during the operation: 1 for shift, 2 for shift lock, 4 for control, 8 for mod1 (alt or meta), 16 for mod2, 32 for mod3, 64 for mod4, and 128 for mod5. Holding the shift key and pressing the left mouse button is equivalent to pressing the middle mouse button. Similarly, pressing meta-left is equivalent to the right button. This permits access to the middle and right button functions on machines (e.g.- most laptops) with two button or one button mice. The long(result(10)) value returned by mouse() reflects this convention, returning 2 or 3 for those cases, even though it is button 1 that is actually being pressed. Therefore, there is no way to distinguish shift-left from shift-middle, because the long(result(11)) mask indicates tht the shift button is pressed in either case. (And on a machine without a middle button, there would be no way to emulate shift-middle anyway.) Builtin function, documented at i0/graph.i line 1370SEE ALSO: moush
moush
moush() or moush(y, x, ireg) returns the 1-origin zone index for the point clicked in for the default mesh, or for the mesh (X,Y) (region array IREG). Interpreted function, defined at i0/graph.i line 1429
mphase
mphase Keyword, defined at i0/graph.i line 1021SEE mspace
msize
msize Keyword, defined at i0/graph.i line 1021SEE mspace
mspace
mspace= plotting keyword or mphase= plotting keyword or msize= plotting keyword or mcolor= plotting keyword selects the spacing, phase, and size of occasional markers placed along polylines. The msize also selects polymarker size if type is "none". The spacing and phase are in NDC units (0.0013 NDC equals 1.0 point); the default mspace is 0.16, and the default mphase is 0.14, but mphase is automatically incremented for successive curves on a single plot. The msize is in relative units, with the default msize of 1.0 representing 10 points. The mcolor keyword is the same as the color keyword, but controls the marker color instead of the line color. Setting the color automatically sets the mcolor to the same value, so you only need to use mcolor if you want the markers for a curve to be a different color than the curve itself. PLOTTING COMMANDS: plg, plc Keyword, defined at i0/graph.i line 1021SEE ALSO: type, width, color, marks, marker, rays