Author |
Topic  |
|
bur2000
Germany
36 Posts |
Posted - 01/08/2014 : 10:41:13 AM
|
Origin Ver. and Service Release (Select Help-->About Origin): 8.6
Is it possible to position a polygon (or at least a triangle) by setting the coordinates of the vertices? I could only find an option to position the object by setting the coordinates of the rectangle that contains the polygon.
I have three data points in a diagram from which I want to create a triangle. I know I can use lines, but then I cannot fill the triangle. |
|
lkb0221
China
497 Posts |
Posted - 01/08/2014 : 10:52:03 AM
|
Hi, Bur
You can use "Fill Area Under Curves"->"Include broken by missing values" in Plot Details dialog, Lines tab to fill the triangle when create from worksheet by line (or line+symbol). See the example below:


Zheng OriginLab |
Edited by - lkb0221 on 01/08/2014 10:55:49 AM |
 |
|
bur2000
Germany
36 Posts |
Posted - 01/09/2014 : 05:54:26 AM
|
Thanks, but I would rather use the object feature to include the triangle and not include it as data points from a workbook. Is it possible to move the polygon in that case? |
 |
|
lkb0221
China
497 Posts |
Posted - 01/09/2014 : 09:46:02 AM
|
To both keep moving and accurate coordinates, I think you can try to plot this triangle in a separate layer with both X and Y scale linked. and use "Analysis: Data Manipulation: Vertical/Horizontal Translate" to move it. |
Edited by - lkb0221 on 01/09/2014 09:46:20 AM |
 |
|
lkb0221
China
497 Posts |
Posted - 01/09/2014 : 12:23:35 PM
|
If you don't mind, you can also use script to control each point of your polygon object. For a triangle, there will be 3 points. After you created a polygon object, you can give it a name for programming use by right click the object and select "Programming Control", by default is "polygon". Then in Script Window, type the following commands:
polygon.x1 = 2; polygon.y1 = 2; // First point at (2,2) polygon.x2 = 8; polygon.y2 = 2; // Second point at (8,2) polygon.x3 = 4; polygon.y3 = 8; // Third point at (4,8)
"object.x#", "object.y#" means the axes position of the #th point of an object. Then there is no need for worksheet data in this case.
Zheng OriginLab
|
 |
|
bur2000
Germany
36 Posts |
Posted - 01/10/2014 : 04:01:11 AM
|
Thanks, that's exactly what I needed. |
 |
|
|
Topic  |
|