ARROW (5/02/2023) Draw a line with an arrowhead.ARROW(Start,Stop) draws a line with an arrow from Start to Stop (points should be vectors of length 2 or 3, or matrices with 2 or 3 columns), and returns the graphics handle of the arrow(s). By itself, ARROW will use the mouse to allow selection.ARROW DEMO & ARROW DEMO2 show 3-D & 2-D demos of the capabilities of ARROW.ARROW PROPERTIES shows the properties that can be set (length, base angle, tip angle, width, which ends have arrowheads, etc.)
ARROW3(P1,P2) draws lines from P1 to P2 with directional arrowheads. P1 and P2 are either nx2 or nx3 matrices. Each row of P1 is an initial point, and each row of P2 is a terminal point.ARROW3(P1,P2,S,W,H,IP,ALPHA,BETA) can be used to specify properties of the line, initial point marker, and arrowhead. Type "help arrow3" at the command prompt for more informationWhat's new in Version 5:All arrowhead and initial point marker sizes (W, H, and IP) are relative to the PlotBox diagonal.Version 5 attempts to preserve the appearance of existing axes. In particular, ARROW3 will not change XYZLim, View, or CameraViewAngle. ARROW3 does not, however, support stretch-to-fill scaling. If a particular aspect ratio or variable limit is required, use DASPECT, PBASPECT, AXIS, or XYZLIM commands before calling ARROW3. Users are encouraged to report problems directly to the author.
This function draws a 3D arrow using a cylinder and cone patch. This allows the use of all patch properties including transparency. It can be used with default parameters (example 1) or user-defined parameters (example 2).example 1:> mArrow3([0 0 0],[1 1 1]); % draws a black arrow from point [0 0 0] to point [1 1 1]example 2:> h = mArrow3([0 0 0],[1 1 1], 'facealpha', 0.5, 'color', 'red', 'stemWidth', 0.02); % draws a semitransparent red arrow with a stem width of 0.02 units from point [0 0 0] to point [1 1 1]; h is the handle to the patch object
This code allows you to create simple, yet powerful three dimensional arrow. As it is derived from the surf command, it may be memory intensive, but well worth the cost for crisp visualization of data using phong shading and MATLAB's lighting options.Example: arrow3D([0,0,0], [0,0,1],'red',0.82);%% Creates a single arrow starting at the origin with magnitude=1 along the z-axis, in red, with an arrowhead 18% of the length and the stem 82% of the length.This has a 'published' file, so use: playshow demoArrow3D to view many of the details or simply view directly the html file attached.
line2arrow.m DocumentationThis line2arrow.m function adds annotation arrows to the end of a line in a 2D Matlab plot. Annotation arrows (created via the Matlab function annotation('arrow', x, y)) are positioned relative to figure coordinates, which can make them difficult to position correctly in terms of axis coordinates. This function does the figure-to-axes coordinate conversion for you.Arrows inherit line properties from the line they are attached to, unlessotherwise specified by the user. You can also resync the line and arrowby clicking on the line. Resyncing matches the arrow color, line width,and line style of the arrows to the lines, and repositions the arrows(because annotation arrows use figure units rather than axis units, thematch between the arrow location and line location will be thrown offduring some resizing of figures/axes, for example with manual aspectratios).Passing a line handle that is already associated with arrows provides thesame syncing action as clicking on the line, but can also be used tomanually change some properties. See example for details.Syntaxline2arrow(h);line2arrow(h, param1, val1, ...)ha = line2arrow(...)See function help for description of input and output variables.ExamplesAdd an arrow to the end of a single line.x = -pi:.1:pi;y = sin(x);h = plot(x,y);line2arrow(h);The arrow will automatically sync if you change line properties, likeline width or color.set(h, 'color', 'red', 'linewidth', 2);Changes to the axis aspect ratios require a manual resync, either byclicking on the line object or recalling line2arrow.set(gca, 'dataaspectratio', [2 1 1]);line2arrow(h);If you manually change things so the arrowhead and line are out of sync(color-wise), the clash will remain until another sync takes place. Soif you want this in your final image, make sure you don't alter the lineafter setting it as such.line2arrow(h, 'color', 'b', 'headwidth', 20);
This function will draw a circular arrow onto the figure supplied by the figure handler. The radius, angle, orientation angle, colour and arrow head type can all be specified. There is also included functionality to be able to use a double headed arrow.
H = STREAKARROW(X,Y,U,V,np,arrow) creates "curved" vectors, from 2D vector data U and V. All vectors have the same length. The magnitude of the vector is color coded. The arrays X and Y defines the coordinates for U and V. The variable np is a coefficient >0, changing the length of the vectors. np=1 corresponds to a whole meshgrid step. np>1 allows ovelaps like streamlines. The parameter arrow defines the type of plot: arrow=1 draws "curved" vectors arrow=0 draws circle markers with streaks like "tuft" in wind tunnel studies
the function creates 3D plot of an arrow
This little function is an alternative to other existing arrow plot functions, since it has very simple, vectorized and effective coding. In fact, arrows are all plotted with a single patch command! The function also accepts any standard patch parameter/value pair like 'FaceColor', 'EdgeColor', 'LineWidth', etc.It can be used to plot a personalized arrow at coordinates X,Y with length L and azimuth AZ, or any of these arguments can be vector or matrix, like QUIVER did, to plot multiple arrows. The option 'Cartesian' allows defining U and V components instead of polar L and AZ.Arrow's aspect ratio, head and segment line shapes are configurable with 4 parameters: head width, head length, head inside length and segment line width, all normalized to arrow's length. See the upper part of examples figure.It is also possible to vary only the arrow length with fixed head and line width, using a reference length. The examples figure shows the effect of this option: upper arrows use a reference length, while lower arrows do not.
Arrowline 3-D vector plot.vectarrow(p0,p1) plots a line vector with arrow pointing from point p0 to point p1. The function can plot both 2D and 3D vector with arrow depending on the dimension of the inputExample: For 3D vector p0 = [1 2 3]; p1 = [4 5 6]; vectarrow(p0,p1) For 2D vector p0 = [1 2]; p1 = [4 5]; vectarrow(p0,p1)
This quiver3D differs from the basic quiver3 in that it allows far more options for visualization. Based on the 'surf' command, you can produce color-based visuals of your data via the multiple arrows to more accurately portray your results with true, three-dimensional arrows. hQ = quiver3D(posArray, magArray, colorArray);% Returns the arrow handles (stem and arrow head separate for more specific visualization: see arrow3D submission for further details). Send an array in the form of: posArray = [x1,y1,z1; x2,y2,z2;...], with same form for delta values and RGB colors.Provides a full demo using:playshow demoQuiver3D
Normally when using quiver, the arrows' size change linearly with the data. However, sometimes the data will appear more naturally in a logarithmic scale, and plotting this is not possible using matlab builtin function. Simply adding a "log" on the velocity data would not work, as it would screw up the angles.This file rescales the velocity data to be logarithmic, which maintaining the angles between the data points.Based on this thread: https://www.mathworks.com/matlabcentral/answers/271952-how-to-create-a-quiver-plot-with-logarithmic-scaled-arrows
Very simple customizable inline function to draw arrows. Lightweight and fast for drawing many, many arrows. You customize fill color, linewidth, etc... Tune theta up if you want a wider arrowhead. takes two [x y] coords and one double, headsize, that allows you to tune the length of the arrowhead to your liking. It's normally set to (length of the line) / 2.5, the headsize variable acts as a multiplier of that (in the numerator).made this in just a few minutes because the other arrow.m thing is too unwieldy and slow. Enjoy!
Only works if axes are even or nearly even. Zip file has function and demo for 2 versions.Clip of 'farrow_demo.m' shown belowhttps://youtu.be/wyY-zuES1U0
Draws textarrow annotation to specified point (x,y) with specified relative length and rotation. Arrow position is refreshed with each zoom callback.All textarrow annotation properties can be modified.Does not display arrow if arrow falls outside of axes boundaries.Use "zoom out" command after first definition.
This is a modified version of the function quiver [from C.M. Thompson] to plot velocity vectors as arrows with components (u,v) at the points (x,y) with the color corresponding to the magnitude of the vector and using the current colormap. Tip: for best results, add set(gcf, 'InvertHardCopy', 'off') after the function to keep the black background on the hardcopy. See attached examples.
A simple plotting tool used for drawing arrows/vectors from point A to B.Both A & B can be either n-by-2 (2D) or n-by-3 (3D) matrices. For more usage example, please use the "help arrow3" command. What is new in version 4:- Transparency and brightness controls- Extended named color table (56 colors)- ColorOrder- LineStyleOrder- LineWidthOrder- Vectorized arrowhead and initial point marker dimensions- Subplot support- Bugs fixed! What is new in version 3:- log plot support- linestyle & width- data aspect ratio support- initial point marker- speed improvement for large (eg. 1000-by-3) matricesDeveloped by Jeff Chang and Tom Davis.
This script helps you to understand how to determine the outward normal of an airfoil or closed curve and plot vectors normal to the curve.
I saw a arrow function by Dr. Erik A. Johnson last night, this function is very useful. But it can only draw 2d arrows, whose heads are patches. So i wrote this functin is used to draw 3D-arrows. the arrows ard made up of cylinders and tapers. The size of arrow head is decided by the minimum distance between start and stop , and you can set the arrow body and arrow head's shape by input arguments. This function will return you the handles of the arrows, so you can set other properties by the handles.And here provide a very useful [rotatedata] function ,which is modified from rotate function.If you have any problem, please contact me by email.
FEATURES:• Fully customizable data tips. • No arguments to pass over. Retrieves all values out of the plot.• Reaction on mouse click, mouse move or mouse move with button down.• Works also with arrow keys.• Activate right mouse button to show interpolated values.• Displays the data point closest to the mouse pointer.• Sticks on a curve by a certain distance to the mouse pointer.*)• Replicates the color of the curve as box color of data tip.• Works also in GUIs.RESTRICTIONS:• 2D plot• One x-axis, not reversed, linear or log.• One or two y-axes, not reversed, linear or log.• Axes limits not set to -inf or inf, in log scale limits set to > 0• At least one data point inside the plot• For interpolated values at least 2 data points inside the plot. No interpolation for vertical lines.METHOD:• Get the mouse pointer location• Retrieve all data out of the plot• Translation of all data points to centimeters• Translation of mouse pointer location to cm• Set origin at mouse pointer location• Find foots of perpendiculars from mouse position to all data lines• Determine closest point (line with shortest distance foot to mouse)• Display data tipMANUAL:Copy the principal of the examples for regular figure or GUI.Note: Data tip title is stored in the plot UserData.SHORT EXAMPLE:hFig = figure;plot(1:.1:2,2:.1:3,'UserData','My data tip title');%Track by mouse click:set(hFig,'windowbuttondownfcn',@DataTip);%Track by mouse move:% set(hFig,'windowbuttonmotionfcn',@DataTip);
% drawArrow(p0,p1,color)%% Draws a simple arrow in 2D, from p0 to p1.%% INPUTS:% p0 = [x0; y0] = position of the tail% p1 = [x1; y1] = position of the tip% color = arrow color. Optional: default is black % --> can be 'r','g','b','c','m','y','w', 'k' or a 1x3 color vector%% OUTPUTS:% hArrow = handle to the patch object representing the arrow%
ARROWZ draws an easily adjustable arrow from startpair to endpair. Thesepairs should be vectors of length 2. The input of ARROWZ can vary from 2to 6 inputs. This arrow can be specified by a startpair, an endpair, also the thickness and color of the shaft and the arrowhead can be customized.ARROWZ(starpair,endpair) creates an easy arrow, a line plot fromstartpair to endpair, with an additional head within the direction of theendpair. Input format is [x y],[x y].ARROWZ(starpair,endpair,headsize) is able to adjust the size of the head.Default size is 1.ARROWZ(starpair,endpair,headsize,shaftsize) sets the thickness of theshaft to the desired size. Default size is 1.ARROWZ(starpair,endpair,headsize,shaftsize,color) specifies the color ofthe total arrow. These values should be provided as RGB. Default is black[0 0 0].ARROWZ(starpair,endpair,headsize,shaftsize,headcolor,shaftcolor) colorsthe shaft of the arrow into a seperate color. Default is black [0 0 0].
Customized quiver plot originally written by Bertrand Dano. My contribution is filled arrowheads.
Rotate the quiver arrows produced by quiver() about their (x,y) base by any specified angle in degrees or radians. h = quiver(X, Y, U, V); quiverRotate(h) Rotate existing arrows by 180 deg.quiverRotate(h, r) Rotate existing arrows by r radians.quiverRotate(h, d, 'deg') Rotate existing arrows by d degrees.[Ur, Vr] = quiverRotate(U, V); Compute the vector components rotated by 180 deg.[Ur, Vr] = quiverRotate(U, V, r); Compute the vector components rotated by r radians.[Ur, Vr] = quiverRotate(U, V, d, 'deg'); Compute the vector components rotated by d degrees.quiver(X, Y, Ur, Vr)
The function pvec makes a vector with arrow head.With x and y you determine origin of the vector.With r you determine the lenght of the vector.With fi you determine the angle in degrees from x axis in positive direction.Additionally you can add color, style, thickness and final position of vector line.Default settings are:color: 'blue'linestyle: '-'thickness: 1endposition: 0If you want to plot multiple vectors on the same plot, use command hold on/off after function.To title the plot use command title under function. More options you can find in the figure under the Insert segment.
The input arguments are the same as for the MATLAB inbuilt function annotation('arrow',...) but the position is defined in the data coordinate system.This function is just a little workaround to add arrows to figures which I use for publications.
This function allows plotting of colored 3D arrows by generating patchdata (faces “F”, vertices “V” and color data “C”). The patch data whichallows plotting of 3D quiver arrows with specified (e.g. colormap driven)color. To save memory n arrows are created using only n*6 faces and n*7vertices. The vector "a" defines arrow length scaling where a(1) is thesmallest arrow length and a(2) the largest. The input c specified color data. Use the PATCH command to plotthe arrows: [F,V,C]=quiver3Dpatch(x,y,z,ux,uy,uz,c,a);patch('Faces',F,'Vertices',V,'CData',C,'FaceColor','flat');
This program use QUIVER/QUIVER2 to generate a vector field specialized plot and then customizes the arrows according to its length.Just type>> quiver2(U,V)and that's it. You get - customized arrows- NaNs ignored and- real (U,V) angles with respect to your print/screen.To use only 7 colors use>> quiver2(U,V,'c=',jet(7))or your own colormap if you have my CMAPPING>> quiver2(U,V,'c=','rygb')To not normalize the length and draw all lines with the same length use:>> quiver2(U,V,'n=',0,'w=',1)To customize the arrows download ARROW by Erik Johnson here at the FileExchange and use:>> quiver2(U,V,'a@','fancy')Of course x,y,z may be used, as well as U,V,W and the S,'filled' normal options of QUIVER, besides of others '=' and '@' options as well.To use it as FEATHER use>> quiver2(U,V,'t=','feather')or>> quiver2(x,[],U,V)Recommended to download also my CMAPPING and TLABEL for better use of this function.Enjoy it! Bugs reports and comments will be very appreciated!
h=vector3d(X,Y,Z,U,V,W,'Property','Value',...) Plot 3d vectors (real 3d) from .stl file to specified location and direction. basically same usage as quiver3. Property/value pairs are passed to patch.Some additional property/values are available:h=vector3d(...,'FileName',file) : string arry with name of .stl file (for example 'arrow4.stl').h=vector3d(...,'Scale',[sx sy sz]) : scales along the x-axis by sx, along the y-axis by sy, and along the z-axis by sz. If scalar, Vectors are scaled uniformly.h=vector3d(...,'MaxVert',nmax) : Maximum number of vertices per vector. Lower this value if many vectors have to be plotted. Default is 200.h=vector3d(...,'Lighting','gouraud') : Sets both, edge and face lighting. Default is flat lightingh=vector3d(...,'Color',rgb) : Sets face and edge color to specified color (indexed or true rgb). When omitted the vector length and current colormap are used.h=vector3d(...,'ColorMap',cmap) : sets the colormap to cmap for plotting. Minimum (but non-zero) and maximum data are mapped to the interval [0 1]. h=vector3d(...,'LightDirection',[x y z]) : Adds a infinite light to the axes with specified position [x y z]Example:[X,Y,Z]=sphere(20);[U,V,W] = surfnorm(X,Y,Z);surf(X,Y,Z);hold onh=vector3d(X,Y,Z,U,V,W,'FileName','arrow2.stl','Scale',0.25,'Lighting',...'gouraud','ColorMap','jet','LightDirection',[-1 -1 1])
See screenshot for quick description of components.User can pan and zoom a plot (or other graphics object with YData/XData) using arrow keys, shift and command. Works by adjusting the Y/X limits of the axes (reference axes) that is parent to the plot (or other object). User can also adjust scroll/pan speed by clicking on the scrollbar.Unlike MATLAB slider scale, the scrollbar can be re-colored (larger range of color choices), resized. Orientation of scrollbar changes automatically when reference axes or figure position changes. Scrollbar limits can also be linked to plot handle X/Y data limits.When commands outside of superscroll change references axes limits (e.g. you linked the reference axes to another axes). The scrollbar will adjust to reflect the portion of plotted data that is currently visible in the reference axes.Super scrollbar should work in stand alone applications.The function scrollableplot.m can be used instead of plot to quickly create a plot with scrollbars.Run function example_scroll to see how superscroll works KEY PRESS INFORMATION (used to manipulate the scrollbar) || Key || Description ||(+modifier) || ------------------------------------------------------------- PANING------------------------------------------------------------- || > || pan right (moves both left and right sides of patch) || < || pan left || ^ || pan up (moves both top and bottom sides of patch) || v || pan down ZOOMING (horizontally)--------------------------------------------- || > shift || zoom in horizontally (moves only left side of patch right) || < shift || zoom out horizontally (moves only left side left) || > command || zoom out horizontally (moves right side right) || < command || zoom in horizontally (moves right side left) ZOOMING (vertically)----------------------------------------------- || v shift || zoom in vertically (moves only top side of patch down) || ^ shift || zoom out vertically (moves top side of patch up) || v command || zoom out vertically (move bottom side of patch down) || ^ command || zoom in vertically (moves bottom side up)
There are too many people want to plot data with arrows and some MATLAB user share some useful functions to do this. But there are still some problems. Such as if the ratio of X-axis and Y-axis is not equal, the arrows will be out of shape or direct to the wrong direction. My function solve these problems and is simple to use.Just use arrowPlot(X, Y), it can plot curve just like plot(X, Y) and add 2 arrows to the curve with beautiful arrow shape, on suitable positions, with suitable size, directing to suitable directions. If you are not satisfied with some of the properties of arrows, you can use some options to change the properties by 'varargin' of arrowPlot(X, Y, varargin). For details of using, please see the help text of this function.
drawVector - draws 2D or 3D vectors from specified pointsdrawOrdinates - draws 3 arrows representing the basis vectors of an R3 coordinate system ----------------------------------drawVector - is a very simple function to make drawing vectors using the quiver and quiver3 functions a little more convenientall this is to prepare the input from xyz triplets or lists of pints andvectors and pass it into the quiver or quiver3 functionsI was just getting tired of typing it out every timeSyntax: q=drawVector(points, vectors); q=drawVector(points, vectors, color); q=drawVector(points, vectors, color, weigth); drawVector(points, vectors); drawVector(points, vectors, color); drawVector(points, vectors, color, weigth);Inputs: points - Nx3 (3D) or Nx2 (2D) matrix; rows correspond to points if N==1 the same point will be used as origin for all vectors vectors - Nx3 (3D) or Nx2 (2D) matrix; rows correspond to vectors color - (optional) string ('r', 'red', etc), RGB triplet or hexadecimal string; default='red weight - (optional) scalar setting LineWidth and arrow head size; default=3;Outputs: for simple drawing the output does not have to be defined defining the output, p, saves the graphics element to allow later editingExample: % draw 3 red vector arrows from 3 points % red is the default color p=[0 0 0; 0 1 1; 2 1 1]; v=[1 1 1; 2 3 -4; 1 0 0]; drawVector(p, v); axis equal % draw 3 blue vector arrows from a single point with wider lines p=[2 1 1]; v=[1 1 1; 2 -3 -1; 1 0 0]; drawVector(p, v, 'blue', 5); axis equal % defining the output saves the graphics element and allows for later % changes to quiver properties p=[2 1 1]; v=[1 1 1; 2 -3 -1; 1 0 0]; q=drawVector(p, v, 'blue', 5); axis equal q.LineStyle='-.';-----------------------------drawOrdinates - simple function to draw arrows representing the basisvectors of any R3 coordinate systemSyntax: drawOrdinates drawOrdinates(ord, ori) drawOrdinates(ord, ori, ...)this is a simple function to draw 3 vectors representing the axes of acoordinate systemAll this really does is prepare the inputs to pass them into the built-inquiver3 function. I was just tired of typing it out all the time.Inputs: ord - ordinates; 3x3 matrix, each column represents one axis as a 1x3 vector. default x, y, z unit vectors at the origin ([1, 0, 0; 0, 1, 0; 0, 0, 1]) ori - origin; 1x3 matrix specifing the coordinates at which to draw; default [0, 0, 0]Optional Name-Value pairs scale - scalar; factor by which to scale the length of each arrow; default=0 weight - scalar; defines lineweight and arrow head size; default=3 colors - 1x3 list of strings defining colors for each vector; default=['r', 'b', 'g']); alternative: 3x3 matrix, where each row defienes one arrow color as an RGB tripletOutputs: no outputs need to be specifiedExample 1: % calling the function without specifying any input will draw 3 unit % vectors along the x, y, and z axis at the origin drawOrdinatesExample 2: % vec=[3, 4, 5]; % start with a random vector % vec=vec/norm(vec); % normalize % ord=null(vec); % use null(x) to find 2 orthonormal vectors % ord=horzcat(vec', ord); % concatenate matrix of orthonormal basis vectors % % % draw new ordinates with default settinngs at the origin % drawOrdinates(ord); % axis equal % % % draw new ordinates centered at [2, 10, 3] with a changed appearence % drawOrdinates(ord, [2, 10, 3], 'weight', 5, 'scale', 5, 'colors', [0 0 1; 0 0 1; 0 0 1]); % axis equal
Struct to create truck and a dock object and simulate with keyboard arrows.truck.m: Handle object that simulates a truck with a cabin and a truck.dock.m: Handle object that simulates a dock.logic.m: Creates a fuzzy logic control for this problem (see the file for more information of how to use other fuzzy files)Example:d = dock([17,50],0);d.minDistance = 3;d.minOrientation = 45;t = truck(d.position+[20 0]);t.supressWarnings = 1;h = t.plot('','','','hold');d.plot(h,'','plotPoint','hold');while ishandle(h) && ~strcmp(t.lastPressedKey, 'escape') t.move; % this enables user to control the truck with keyboard arrows (spacebar resets steering) h = t.plot('next','b','','hold'); if d.docked(t,'message'), break, end pause(.001);endSee html file for more help.See example_simulation.m for more examples that uses fuzzy logic control.Attention: if the response speed is slow with MATLAB 2016a, try using MATLAB 2015b.
function [h1, h2] = plot_dir (vX, vY) Plotting x-y variables with direction indicating vector to the next element.Example vX = linspace(0,2*pi, 10)'; vY = sin (vX); plot_dir(vX, vY);Plot and quiver functions used.
This little program allows you to draw a solid arrow head (a triangle) into the current plot to indicate a direction on a line.I wrote this little program mainely for use in phase plane plots (screenshot), when you want to indicate what direction a trajectory is run throught.The m-file contains a detailed help.
Draws two dimensional vectors on Matlab figures. Uses complex numbers. Example provided. Should be used in conjunction with 'export_fig' for high quality output. For each vector, start point, end point, arrow head length, arrow tip angle, colour, & line width are specified. If pol2rec(magnitude, angle) also downloaded, can take vector start/end point in polar form. How it works: arrow head is 250 carefully placed lines at right angle to vector, finishing at end point of vector.
The function draws a circular arc around a vector in the direction of "norm". Also uses mArrow3 uploaded in file exchange. Additional functionality added in mArrow3 to change arrow-head-length. So use the version of mArrow3 attached here. Start and end angles can be changed for the arc. Not tested completely. Play around, modify and send your comments, feedback and queries (bharathswnathan@gmail.com).
draw_line3 draw directional vector points in 3D with directional arrowsdraw_line3(p1, p2) draw line with defulat optional parmeters;draw_line3(p1, p2 , param1, val1, ...)The line with stretching(<-->) and compressive(>---<) arrows or withoutarrows (----) can be plotted. Input arguments: ---------------------- p1, p2 : Cordinates of the two points in 3D Optional parameters ( passed as parameter/value pairs):--------------'LineColor' : Colour of line ( vector of colour or char) default : % 'b' 'LineWidth' : Width of the line (Scaler values) default : 2) 'ArrowDirection' : (0,1,2) (0 : p1--- p2, 1: p1 --> p2 2: and P1 <-> p2) default : 1'ArrowLength' : Length of the arrow ( scaler values) default : 5'ArrowIntend' : Intended arrow ( scaler value) default : 2'ArrowAngle' : Angle of arrow with the main line in degree default : 45'ArrowColor' : Arrow face clour ( in color vector or char) default : 'b''EdgeColor : arrow edge colour ( in colour vector or char or default : 'g''FaceAlpha : alpha values for face transparency of the arrow and line default : 1.0'EdgeAlpha : alpha values for edge transparency of the arrow and line default : 1.0'Linestyle : Linetyle on the line and arrow face ('-' , '--',..) default : 'None'Example:draw_line3([0 0 0]', [100 100 100]',... 'Linecolor', 'b',... 'LineWidth', 5 ,... 'ArrowDirection', 2,... 'ArrowLength', 10,.... 'ArrowIntend', 3,... 'ArrowAngle', 45,... 'ArrowColor', 'r') will draw the line with the specified optional parameters in the current plot.
This function allows arrowheads to be inserted into a line plot. This allows showing the direction of the line. Input parameters can also change the frequency of the arrowheads and their scale.Multiple columns of y-axis data can be supplied to and returned by the function to allow plotting multiple arrowed lines in a single figure.
The present code is a Matlab function that provides interactive sliding of a plot along its x-axis using the keyboard arrows. The function is very suitable for organizing of visualization and inspection of data with big number of columns (vectors or matrices), so 2D and 3D plots can be sliding along its x-axis with given span and step-size. The user can navigate through the x-axis via the keyboard arrows as follows:- left and right arrows allow navigation backwards and forwards along the x-axis, respectively, with given user-defined step-size (hop size; x-axis' advance);- down and up arrows allow navigation backwards and forwards along the x-axis with 10 times the preset step-size;- “Home” key – backwards to the beginning of the x-axis;- “End” key – forwards to the end of the x-axis.The additional command “slidingtogether” provides simultaneously sliding of several subplots, if there is a need. The “slidingtogether” command could not be used independently but only in conjunction with the developed “slidingplot” function.Three examples are given in order to clarify the usage of the function. For convenience, the input and output arguments are given in the beginning of the function.
Just provide the color you want to the function and that's it! Example for single arrow:my_color = 'r';squiggly_arrow(my_color)Example for double arrow:my_color = '#64B900';squiggly_arrow2(my_color)I recommend using export_fig (https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig) for easily exporting the squiggly arrow as .png. You can without any background as:export_fig('your_file_name','-r300','-transparent')
UsagePlease open plotpp_example.mlx which contains three examples. If you do not have a live editor with your matlab version, then the following content might be useful to you.In the first example, we only need one single command to get the phase portrait.plotpp(@(t,x)[x(2);-x(1)-1*x(2)])In the second example, we plot the phase portrait of the van der Pol equation:We set the time span to 20 second, which is a proper time for demonstration, by trail and error. And we changed the color of quiver and lines to have a nice look.odefun = @(t, x) [x(2); -x(1) + 0.5*(1 - x(1)^2)*x(2)];plotpp(odefun,'tspan', 30,... 'quivercolor', [0.6,0.6,0.6],... 'linecolor', [0.3,0.3,0.3])The third example is the swing equation:We only want to plot the trajectories from the saddle to know where the region of attraction (ROA) is. Therefore, we set the input argument 'plotNonSaddleTrajectory' be false. We also set the solver region be for and for , and set the minimum arrow density on trajectory, as are indicated by the arguments. Besides, to plot the trajectory of the unstable manifold of the left UEP, which converges to the left SEP, we set the axisMarginRatio to 0.5(scaled) so that the integration wouldn't stop on it, and hence we could get a complete trajectory towards the left SEP. Moreover, we do not want to display the quiver of the vector field, so we switch 'plotQuiver' off.odefun = @(t, x) [x(2); 0.5 - sin(x(1)) - 0.2*x(2)];plotpp(odefun, 'plotNonSaddleTrajectory', false, 'arrowSize', 12,... 'plotQuiver', false, 'axisMarginRatio', 0.5,... 'arrowDensity', 0.1,... 'xlim', [-2*pi, 2*pi], 'ylim', [-3, 3])To generate a nice-look figure for publishing paper, we add more commands to decorate the figure, e.g., resizing the figure, and using Latex commands.set(gcf, 'unit', 'centimeters', 'position', [0,0,14,8])set(gca, 'ticklabelinterpreter', 'latex',... 'xtick', -2*pi:pi:2*pi,... 'xticklabels', {'$$-2\pi$$','$$-\pi$$',... '$$0$$','$$\pi$$','$$\delta\mathrm{(rad)}$$'});ylabel('$$\omega\mathrm{(p.u.)}$$', 'interpreter', 'latex');legend({'Trajectory'}, 'Interpreter',"latex", 'location', 'northwest')More InformationIf you have any questions about plotpp, please refer to the help doc, which contains the detailed definition of the input arguments:help plotppThen the following information will be displayed, which would be helpful for configuration. More configurable options might be deployed in the future. Parameter definitions: -- odefun: (required) this function must be a 2-dimension autonomous function with respect to (t, x). -- tspan: time span for ode computing, default value is 40; -- xLim: x-axis plot range, default value is [-5,5]; -- yLim: y-axis plot range, default value is [-5,5]; -- xPlotNum: trajectories that start/end from horizental border, default value is 4; -- yPlotNum: trajectories that start/end from vertical border, default value is 4; -- lineColor: color of lines and points, default is [0.1,0.1,0.1]; -- quiverColor: color of quiver plots, default is [0.5,0.5,0.5] -- plotNonSaddleTrajectory: whether or not to plot non-saddle points trajcetories, default value is true; -- plotEPs: whether or not to plot equilibrium points (EPs), default value is true; -- plotArrows: whether or not to plot arrows, default value is true; -- plotQuiver: whether or not to plot quiver, default value is true. -- arrowDensity: density arrows on each trajectory, default is 2, and the minimum should be 0.1; -- arrowSize: Size of arrows on the trajectory, default is 9; -- axisMarginRatio: axis margin for solver so that the solver would not stop when the trajectory crosses the axis limitation until it crosses the axis margin border, which is outside the axis limitation, default is 0.1;AcknowledgementThe author is grateful to the author who contribute to the matlab function phasePortraitPlot.m, which enlighted me on how to add arrows on the phase portrait. I used some code pieces of yours, but I couldn't find tags in Matlab file exchanges. The author would also like to thank the author of package arrow and Phase Portrait Plotter for reliance and enlightening.
This function works by setting certain colorbar position, then creating two new axes to patch in the terminal of current subgraph's colorbar.It is recommended to callthis function last when creating plots.
Rather than executing a command at every instance a key is pressed, a switch is activated inside a loop once a key is down and deactivated when the key is released. This creates, in this case, continuous smooth movement and the ability to recognise multiple key presses at once.
Draws pretty arrows, see arrowDemo.m
This function allows the user to draw an arrow from point 1 to point 2.The size of the arrow is controlled by the variable f which is a percentage of an initial value.You can very easily modify this code to change the thickness of the line between point 1 and 2or the color of the line and arrow.
Adds additional info to the decomposition (bar contribution) graphs. It also enables the use of arrow keys to move between individual bar contributions to inspect the data in detail. The function is tailored to the decomposition data in IRIS toolbox format.Input arguments: decomp - IRIS time series data matrix with decomposition legend_names - structure contraining the string names of all the individual contributionsOptional argument: precision - large number, used to avoid indeterminacy in graph when identifying the contribution by clicking
Slightly modified version of quiver3 function that plot arrows with true 3D arrow heads
This app was used in a video posted on the HDL Verifier product page, where it was used as a control panel to control an Arrow DECA MAX 10 FPGA kit. The app uses HDL Verifier's readmemory and writememory commands to read and write from AXI4-accessible registers on the Intel MAX 10 FPGA.
Slightly modified version of Coneplot function that uses the function quiver5 for better 3D arrows
UNZIP ALL FILES FROM FOLDER (PUZZLE.ZIP).PLACE THE FOLDER IN CURRENT FOLDER.AND RUN.... new_puz.mits a fun game...!!!try your hand as well your luck.All the best.
% addrefarrow(h,x,y,u,v)%% This is a quick hack to add a scale/reference arrow at a desired position% given by the input argument (x,y). The scale arrow length in the x% direction is given by u, in the y direction by v. %% WARNING, this function modifies the data contained in the quiver graphics% group handle h!
Puts a buttonless spinner element into the current figure. The number in the spinner can be changed using the arrow-keys, with the magnitude of the change depending on the cursor position. This is helpful in tweaking a number in an input field. Under the hood, this spinner element is an "edit" uicomponent with some special callbacks attached to the underlying Java element. The return value is the (Matlab) handle to this edit field. IMPORTANT: This function uses undocumented, and possibly unstable Matlab functionality. It was tested with with Matlab2016a.
[toc]1. Introduction1.1 Features/Why I wrote thisMore flexibility than the built-in function quiver.The arrows are generated by plot/patch, which provides the possibility that everything can be adjusted. Here are some of the examples:The length of head (fixed length, or a ratio to the arrow length, etc.)Angles between two edges of head.Show/hide the head of arrows.Show/hide the body of arrows.Other properties in plot or patch....Colorful arrows adopted to current colormapSupport creating vector time series"Perfect" arrows1.2 Functions includedFUN_quiver_by_plotV2.mPlot single color arrows by plotFUN_quiver_by_plotV2_mmap.mThis is same as FUN_quiver_by_plotV2.m but compatible with mmapFUN_quiver_by_plotV2_cmap_patch.mPlot colorful arrows based on patch. The color of arrows depends on colormap.FUN_quiver_by_plotV2_cmap_patch_mmap.mThis is same as FUN_quiver_by_plotV2_cmap_patch.m but compatible with mmapFUN_quiver_by_plotV2_preset_cmap.m[not recommended!] This is similar to FUN_quiver_by_plotV2_cmap_patch but the color is defined based on a fixed colormap, which must be specifiedLimitationTo create a perfect arrow, the xlim and ylim must be defined explicitly and it should not be changed after calling this toolbox.2. InstallYou need to add this to the searching path of your Matlab environment before using them. The private folder must be put in the same folder as FUN_quiver_by_plotV2*.m. The subfolders (private, doc) should not be added to the searching path. It can be done by two ways:If you have GUI access to Matlab :Click "Home tab> Set Path". It will open a dialog for setting the path. Then, click "Add Folder...", add the root path of this package (the folder contains functions FUN_quiver_by_plotV2*.m), then click "Save" near the bottom of the dialog.If you are in a command line environment:Method 1 (recommended):addpath('/path/to/Quiver_by_plotV2/');savepathMethod 2:Matlab will run startup.m during boot automatically if the file exists. Thus, you can add addpath('/path/to/Quiver_by_plotV2/'); to the startup.m file and make sure that the startup.m is put in existing searching path. This provide more flexibility.3. How to use this toolbox3.1 Plot arrows without colormap (FUN_quiver_by_plotV2.m)FUN_quiver_by_plotV2[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v)[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v, vel_scale)[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v, vel_scale, ...)INPUT: x, y, u, v : input data vel_scale [optional, default: 1 ] 0: auto scale 1: No scale, the original u/v will be used otherwise: this scale will be applied to u and v.Other parametersParameterDefault valueNotesis_plot_headtrueshow/hide head of arrowsis_plot_bodytrueshow/hide body of arrowsfill_headfalseIf this is true, a filled triangle will be used as the head of each arrow.In this case, patch, instead of plot, is used to plot arrow heads.color'k'color of arrowshead_length_pixel0length of (the wing of) arrow head in units of pixelIt shares the same unit with u and v. (Thus, the vel_scale will also be applied to head_length) 0 : it is set according to the gca (width & length in pixel). >0 : it is the absolute length of the arrow head -1~0: it is the percent of total vector length at each point.head_length_min_pixel0minimal length of arrow head length in units of pixel.head_angle15Angle between arrow head and arrow body2*head_angle is the angle between the two wings of the arrow head.is_correct_anglefalseThis is for vector time series and some special cases.is_correct_angle_by_edit_vfalsehead_style1Head style. Seeinterval1intervalinterval_xintervalinterval for the first dim (usually x)interval_yintervalinterval for the second dim (usually y)is_plot_via_arrayfunfalseCall plot via arrayfun. This is useful if you want to change properties of a subsample of arrows.false: The returned handles h1 & h2 are 1 x 1 matrix (one for array body and one for arrow head)true: The returned handles h1 & h2 are [m x 1] matrix (one for array body and one for arrow head)Note: this does not support colorful plots yet.gca_pos_now[]By default, FUN_quiver_by_plotV2 will get it by calling plotboxpos. However, this costs a lot of time in repeating hundreds of plots with the same configuration. Providing this as an input variable could save some time..... [varargin]....Other parameters (e.g., 'linewidth') applicable to plot for regular plots or patch for colorful arrows.Parameters not recommendedParameterDefault valueNoteshead_length0length of (the wing of) arrow head in the same unit as x-axisIt shares the same unit with u and v. (Thus, the vel_scale will also be applied to head_length) 0 : it is set according to the gca (width & length in pixel). >0 : it is the absolute length of the arrow head -1~0: it is the percent of total vector length at each point.head_length_min0minimal length of arrow headOutputh1: handle array for arrow bodyh2: handle array for arrow headuu [ 3 x N ]: x coordinate for arrow body, the 3 values in each col are [ x_origin; x_head; Nan]vv [ 3 x N ]: y coordinate for arrow body, the 3 values in each col are [ y_origin; y_head; Nan]hu [ 4 x N ]: x coordinate for arrow head, the 4 values in each col are [ x_head_wing1, x_head_center, x_head_wing2; Nan]hv [ 4 x N ]: y coordinate for arrow head, the 4 values in each col are [ y_head_wing1, y_head_center, y_head_wing2; Nan] you can re-plot the arrows by uu,vv hu, hv: plot( uu(:), vv(:) ); % plot arrow body hold on plot( hu(:), hv(:) ); % plot arrow headDemosData used in this demo is generated by the following codesx = -1:0.2:1;y = -1:0.2:1;[X,Y] = meshgrid(x,y);X=X';Y=Y';theta = atan2d(Y,X);r = sqrt( X.^2 + Y.^2);u = sind( theta ) .* r / 100;v = -cosd( theta ) .* r / 100;x = x*10 - 75;y = y*10 + 35;This is also available here: Data_demo_1.mat.Demo - plot arrows.figurexlim([-88 -62]);ylim([22 48]);FUN_quiver_by_plotV2( x, y, u, v, 0 )title('Example 3.1: FUN_quiver_by_plotV2','Interpreter','none');FUN_easy_export_fig('Example_3.1.jpg','-m2');Demo - set absolute scalevel_scale1 = 200;vel_scale2 = 300;figurexlim([-88 -62]);ylim([22 48]);hold onhd1 = FUN_quiver_by_plotV2( x, y, u, v, vel_scale1, 'color','m' );hd2 = FUN_quiver_by_plotV2( x, y, u, v, vel_scale2, 'color','k' );lid = legend( [hd1, hd2], 'scale=200', 'scale=300');set(lid,'Interpreter','none');box ontitle('Example 1.2 "scale"');Demo - set head length in pixel (parameter: 'head_length_pixel').head_length1 = 20;head_length2 = 10;figurexlim([-88 -62]);ylim([22 48]);hold onhd1 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'head_length_pixel', head_length1, 'color','m' );hd2 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'head_length_pixel', head_length2, 'color','k' );lid = legend( [hd1, hd2], 'head_length_pixel=20', 'head_length_pixel=10');set(lid,'Interpreter','none');box ontitle('Example 1.3: "head_length (positive)"','Interpreter','none');head_length1 = -0.6;head_length2 = -0.3;figurexlim([-88 -62]);ylim([22 48]);hold onhd1 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'head_length_pixel', head_length1, 'color','m' );hd2 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'head_length_pixel', head_length2, 'color','k' );lid = legend( [hd1, hd2], 'head_length_pixel=-0.6', 'head_length_pixel=-0.3');set(lid,'Interpreter','none');box ontitle('Example 1.3: "head_length (negative)"','Interpreter','none');Demo - set head angle (parameter: 'head_angle').head_angle1 = 20;head_angle2 = 40;figurexlim([-88 -62]);ylim([22 48]);hold onhd1 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'head_angle', head_angle1, 'color','m' );hd2 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'head_angle', head_angle2, 'color','k' );lid = legend( [hd1, hd2], 'head_angle=20', 'head_angle=40');set(lid,'Interpreter','none');box ontitle('Example 1.4: "head_angle"','Interpreter','none');Demo - hide arrow head (parameter: 'is_plot_head').figurexlim([-88 -62]);ylim([22 48]);hold onhd1 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'is_plot_head', false );box ontitle('Example 1.5: "is_plot_head=false"','Interpreter','none');Demo - hide arrow body (parameter: 'is_plot_body').figurexlim([-88 -62]);ylim([22 48]);hold onhd1 = FUN_quiver_by_plotV2( x, y, u, v, 0, 'is_plot_body', false, 'head_length_pixel', 30, 'color','k' );box ontitle({'Example 1.6: "is_plot_body=false"','In this case, length of the arrow head must be','provided in parameter "head_length"'},'Interpreter','none');Demo - perfect arrow headfigurexlim([-0.2 1]*0.4);ylim([-0.2 1]*1);hold on% this toolboxhd1 = FUN_quiver_by_plotV2( 0, 0, 5, 5,0.050 );% built-in matlab functionhd2 = quiver(0, 0, 5, 5 , 0.05, 'color','r', 'AutoScale', 'off','MaxHeadSize',15);lid = legend( [hd1, hd2], 'FUN_quiver_by_plotV2', 'quiver');set(lid,'Interpreter','none');box ontitle('Example 1.8: a "perfect" arrow','Interpreter','none');3.2 Plot colorful arrows (FUN_quiver_by_plotV2_cmap_patch)[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v)[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v, vel_scale)[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v, vel_scale, 'zval', zval)[h1,h2, uu, vv, hu, hv] = FUN_quiver_by_plotV2( x, y, u, v, vel_scale, 'zval', zval, ...)INPUTparamter 'zval' is used to determine the color. By default, zval = sqrt( u.^2 + v.^2).Other parameters are identical to FUN_quiver_by_plotV2.outputIdentical to FUN_quiver_by_plotV2.DemoDemo - a simple caseIn this case, the color is defined by the length of arrows, which is usually the magnitude of velocities.%% prepare datax = 1:40;y = 1:30;[X,Y] = meshgrid(x,y);X=X';Y=Y';u = sin( 2*pi/30 .* X );v = cos( 2*pi/30 .* Y );% plotfigurearrow_scale = 0; % 0: the scale is determined by the script automatically.FUN_quiver_by_plotV2_cmap_patch( x, y, u, v, arrow_scale );grid onbox onxlabel('x');ylabel('y');colorbartitle({'Example 1: a simple case', 'Color is defined by the magnitude of arrows'});Demo - the color is defined by a given matrixIn this example, the arrow color is defined in parameter zval.%% prepare datax = 1:40;y = 1:30;[X,Y] = meshgrid(x,y);X=X';Y=Y';u = sin( 2*pi/30 .* X );v = cos( 2*pi/30 .* Y );%% plotfigurexlim([1 41]);ylim([1 31]);arrow_scale = 0; %autovalue_for_color = sqrt(X.^2+Y.^2);FUN_quiver_by_plotV2_cmap_patch( x, y, u, v, arrow_scale, 'zval', value_for_color );grid onbox onxlabel('x');ylabel('y');colorbartitle({'Example 2.2: Color is defined by parameter "zval"'});3.3 Work with mmap3.3.1 Simple arrows (FUN_quiver_by_plotV2_mmap)Inputs are identical to FUN_quiver_by_plotV2.It is recommended to call m_grid before FUN_quiver_by_plotV2_mmap%% prepare datax = -1:0.2:1;y = -1:0.2:1;[X,Y] = meshgrid(x,y);X=X';Y=Y';theta = atan2d(Y,X);r = sqrt( X.^2 + Y.^2);u = sind( theta ) .* r / 100;v = -cosd( theta ) .* r / 100;x = x*10 - 75;y = y*10 + 35;%% plotfigurehold onm_proj('lambert', 'lon', [-88 -62], 'lat', [22 48] );m_grid;hd1 = FUN_quiver_by_plotV2_mmap( x, y, u, v, 0 );m_coast('color','b')title({'Example 3.1: Arrows on m_map'},'Interpreter','none');3.3.2 Colorful arrows (FUN_quiver_by_plotV2_cmap_patch_mmap)Inputs are identical to FUN_quiver_by_plotV2_cmap_patch.It is recommended to call m_grid before FUN_quiver_by_plotV2_mmap%% prepare datax = -1:0.2:1;y = -1:0.2:1;[X,Y] = meshgrid(x,y);X=X';Y=Y';theta = atan2d(Y,X);r = sqrt( X.^2 + Y.^2);u = sind( theta ) .* r / 100;v = -cosd( theta ) .* r / 100;x = x*10 - 75;y = y*10 + 35;%% plotfigurehold onm_proj('lambert', 'lon', [-88 -62], 'lat', [22 48] );m_gridFUN_quiver_by_plotV2_cmap_patch_mmap( x, y, u, v, 0 );m_coast('color','b')colorbartitle({'Example 3.2: Colorful arrows on m_map'},'Interpreter','none');3.4. Vector Time SeriesTo plot vector time series, plot set is_correct_angle to true.%% prepare datax = 0:5:270;u = cosd(x);v = sind(x);%% Example 1.1 A simple casefigure('position',[ 100 100 980 300])hold on% please always set xlim and ylim firstxlim([min(x) max(x)]);ylim([-1.2 1.2])vel_plot_scale = 1; % arrow sacle% plot arrows% 'is_correct_angle' is set to true to plot arrows according to its real% direction, ignorning the ratio between x & y axis. FUN_quiver_by_plotV2( x, zeros(size(x)), u, v, vel_plot_scale, 'is_correct_angle', true, 'is_plot_head', false);box onplot( x, zeros(size(x)), '-b');title('Example: Vector time series');3.5 Arrow styledefault style (head_style=1)The head_style=2 can be further tuned by setting parameter head_length_24. AcknowledgementsMatlab script plotboxpos, which is available from https://github.com/kakearney/plotboxpos-pkg, is adopted to calculate the accurate axis ratio.
Plots a simple arrow-plot, given a table representing readings on several variables on two points in time.
Usage: arrowflow(x,y,sx,sy,r); Input: x,y : initial position coordinates default is 0,0 sx,sy : scaling of arrows along x and y coordinates as a percentage of axis length, e.g. 10% default is 10,10 r : angle of rotation r=1 --> East-North r=2 --> North-West r=3 --> West-South r=4 --> South-East default is 1 Output: h : handles of plot of the arrows Example: figure; plot(0:0,1:1); plot(0:1,1:0); arrowflow(1/3,2/3,0,0,1); arrowflow(2/3,2/3,0,0,3); Issues: To keep arrows of same length requires:axis square;
function [h1, h2] = plot_dir3 (vX, vY, vZ) Plotting x-y-z variables with direction indicating vector to the next element. Example vX = linspace(0,2*pi, 10)'; vY = sin (vX); vZ = cos (vX); plot_dir3(vX, vY, vZ);
ezquiver takes a string representing a function with x, y, and z components and plots it in 3-d along with a set of arrows which are parallel to the function. Syntax ezquiver(fun) ezquiver(fun, domain) ezquiver(funx, funy, funz) ezquiver(funx, funy, funz, [smin, smax, tmin, tmax]) ezquiver(funx, funy, funz, [min, max]) ezquiver(..., Name, Value) h = ezquiver(...)for more information execute:doc ezquiver
Zoom and pan(scroll) plotted data (referencePlot) using keypresses (arrow keys, shift, and command).Keypresses adjust the X and Y limits of the axes (Ax2Adjust) where the data are plotted. referencePlot can be any graphics object with properties X-Data and Y-Data.A separate axes (TrackerAx) shows the user which portion of the referencePlot is currently visible in Ax2Adjust. TrackerAx contains copy of referencePlot (miniPlot) such that all its X and Y data are visible. A semi-opaque yellow square (TrackerPatch) highlights the portion of referencePlot data currently visible in Ax2Adjust.Orienter automatically responds to events.If referencePlot X or Y data or Ax2Adjust limits change, listeners automatically adjust miniPlot and TrackerAx accordingly. This allows you link axes with Ax2Adjust and to edit referencePlot data without having to alter Orienter.User can adjust the speed/precision of zooming and panning.More specifically, user can adjust how much the axes limits changes with each key press by clicking the patch object.Axes Orienter should function in standalone applications/GUIs.TrackerPatch appearance can be altered by accessing Patch properties (e.g. ‘FaceColor’ for color, ‘FaceAlpha’ for transparency).Limitations:Only changes in referencePlot XData and YData properties will cause miniPlot to update. If properties of referencePlot BESIDES XData and YData change (e.g. Color), these changes will not transfer to miniPlot until you call referencePlot. You can always ensure miniplot matches referencePlot by usingupdate_miniPlot method. When referencePlot X/Y Data do change, ALL properties of referencePlot are transferred to miniPlot.
Just click and drag while seeing the final shape and lift the mouse button when its fine! Check readme.txt for detailed instructions.