The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Connecting scatter point with arrows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mrandersb

25 Posts

Posted - 05/27/2010 :  05:36:17 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Is it possible to connect scatter point with straight arrows, preferably with an arrow at the middle of the line connecting the points.

Anders

Penn

China
644 Posts

Posted - 06/01/2010 :  01:05:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Anders,

The current Origin version (Origin 8.1 SR3) does not support this feature. However, as a workaround, you can use LabTalk script to add a line with arrow to do that.

Suppose your graph is come from [book1]sheet1!col(1) & [book1]sheet1!col(2). After making a graph (line + symbol) with these two columns, activate the graph and run the following script.

range xRange = [book1]sheet1!col(1);  // column 1
range yRange = [book1]sheet1!col(2);  // column 2
for(ii=1; ii<[book1]sheet1!wks.maxrows; ii++)
{
	x1 = xRange[ii];  // x coordinate of point one
	y1 = yRange[ii];  // y coordinate of point one
	x2 = xRange[ii+1];  // x coordinate of point two
	y2 = yRange[ii+1];  // y coordinate of point two
	xc = x1+(x2-x1)/2;  // x coordinate of center
	yc = y1+(y2-y1)/2;  // y coorindate of center
	draw -n line$(ii) -lm {x1, y1, xc, yc};  // draw a line
	line$(ii).arrowEndShape = 3;  // add an arrow
	line$(ii).arrowEndWidth = 15;  // set width of arrow
	line$(ii).color = 2;  // set color of line, red
	layer -a;  // rescale the layer
}


Penn
Go to Top of Page

mrandersb

25 Posts

Posted - 06/23/2010 :  07:03:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thanks it seems to work, but there are some scaling problems, but i think i can work it out.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000