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
 All Forums
 Origin Forum
 Origin Forum
 How to connect independent points with line

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
adamleewiner Posted - 09/08/2008 : 12:37:15 AM

This scatter plot is draw out of a single Y column.
I can use scatter+line to connect all of the points.
However, I just wanna some of the points to be connected with scatter+line, e.g.the red square point£¬the greens,and the blues.
How to do that?


An USTCer always keep trying.
5   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 10/03/2008 : 1:42:26 PM
Hi Adam,

Actually in Origin 8, we have a built-in X-Function: plotgroup that can plot the data you wanted. But it's not available from GUI.

The plotgroup xfunction supports 3 levels of grouping. You can run Help plotgroup to see more information.

For your data with one grouping info.,
1. Suppose you have A(X) B(Y) data and grouping info. in the third column.
2. First Sort the worksheet based on grouping info. Note: if you want the X data to be from left to right in graph, you need to sort the worksheet by both grouping info. and X data column. You can do it by choosing Worksheet: Custome. Set Nested Sort Criteria to be sort by col C ascending first, then col(A) ascending next.
3. Then Highlight col B and run plotgroup -d in script window.
4. In the dialog opens, choose Col(C) as Column for Data Group.
5. Click OK.
--> The grouped data will be plotted as scatter graph.
6. Clikc Line+Symbol button on 2D Graphs toolbar.
--> The data points will be connected.
7. Also the grouping info. will show in legend.
Note: If u click Line button on 2D Graphs toolbar, the plot will be Line plot only.


Thanks, Snow Li
OriginLab Corp.
adamleewiner Posted - 09/09/2008 : 10:25:43 AM
Thanks for your kind help.

Adam

An USTCer always keep trying.
Deanna Posted - 09/08/2008 : 9:49:51 PM
I actually did more configuration (mapping the symbol shape to column C) to the graph to have different types of symbols. With the steps in my last reply, we should get the following graph:


I am sorry my original graph was misleading.

If you want to add additional symbols to the legend, you can right-click on the legend and then choose Properties from the short-cut menu to open the Object Properties dialog. This dialog allows you to edit the legend. Please see this page in our online help for more details.

Deanna
OriginLab Technical Services
adamleewiner Posted - 09/08/2008 : 08:09:01 AM
I did exactly as you instructed, but there is a difference.
The symbols in my plot are the same-they are all square-while three different types of symbols exist in you graph. Why?
I am using SR0.
Another question: how to add additional symbols into the legend?
Thanks anyway.

An USTCer always keep trying.
Deanna Posted - 09/08/2008 : 04:17:41 AM
Hi Adam,

Is it possible to sort your data according to the color? If your symbol color is mapped to a column, I think it is easy to sort the data according to that column. Then we can create separate line + symbol plot for data points that are in the same color in a convenient way.

For example, if the original data is shown in Book1 below and column C is used to control the color of symbols, we can highlight column C, right-click on it and select Sort Worksheet: Ascending to sort the worksheet. The result will be like Book2. With the sorted worksheet, we can do the following to create a graph:
  • Highlight column B and column C. Then select Plot: Symbol: Color Mapped from the main menu to create the scatter plot.
  • Make the worksheet active again. Highlight the first 3 rows in column B. Release your mouse. Hold the CTRL key down. Select row 4 to row 6. Release the mouse button again, but still keep the CTRL key down. This time, select row 7 to 9.
  • Make the graph page active. From the Origin menu, select Graph: Add plot to layer: line


The result graph should look line the one in the screenshot.



If this method does not work for you or your data is not arranged in the form shown above, please provide us with more details of your data. You can also send your data to us via this web form:
http://www.originlab.com/www/company/qform.aspx?s=1&

Deanna
OriginLab Technical Services

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000