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
 Plotting Double Y with Just 1 Data Plot

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
gt205v6 Posted - 11/16/2005 : 6:11:04 PM
Origin Version (Select Help-->About Origin): 7.0220
Operating System: windows XP

I have a pretty basic question actually, i just couldn't figure out how to solve it. Now assume you have some x values and two different y values assigned to that. For example:

x y1 y2
1 4 8
2 6 12

Now there is a function called Double-Y plotting (plot-special line/symbol-Double Y). The only problem is it plots two different lines for y1 and y2. I want a function so that it can plot just one line for the data and adjust the y1 and y2 axis so that one data shows y1 value on the left and y2 on the right, instead of 2 different plots in the graph.

Hope I was clear enough :)
Thank you for your help in advance,

Hakki

****


Sorry forgat to add, assume that the Y1 and Y2 values are linear with each other (not like the data i showed you :) )[red]


Edited by - gt205v6 on 11/17/2005 11:31:05 AM
5   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 11/22/2005 : 1:27:49 PM
Hi Hakki,

Looks like you do not have the latest service release for your Origin 7.0 - the command works fine in 7.0SR4 and SR4 was the final service release.

You can download and install SR4 for your Origin 7.0 for free, from the following page:
http://www.originlab.com/index.aspx?s=9&lm=+145&ID=918&language=all

Easwar
OriginLab

P.S. Also make sure you have the graph window active when issuing the command (click on the graph window first and then on script window and then issue the command)



Edited by - easwar on 11/22/2005 1:28:49 PM
gt205v6 Posted - 11/22/2005 : 12:43:50 PM
Dear Easwar,

This is exactly what I was looking for. Thank you very much for your post.

I have a small problem with your way though, when i post your script into the script window, it gives error message like this:

layer1.y.ticksbydata$=data1_b;
#Command Error!

What might be the problem?

Thank you very much,

Hakki
easwar Posted - 11/20/2005 : 10:15:33 PM
Hi Hakki:

I put some arbitrary data in cols A thru C of Data1 worksheet (see image for the data) and used the following procedure to get the graph shown in the image.

Steps:
======
1> Plot graph using cols A, B
2> Double-click on left Y axis to bring up the Axis dialog
3> In the Selection box on the left, scroll down and select Right and then under Tick Labels tab check the Show Major Labels check box. Then click on Title & Format tab and check the Show Axis & Ticks checkbox. Click OK to close dialog.

The above basically turns on right y axis display for same layer (1). Note that no second layer is added.

4> With graph active, bring up script window and type and hit enter
layer1.y.ticksbydata$=data1_b

The above sets the ticks on left y to be exactly at positions specified by the data in col(B)

5> Double click on the right Y axis to bring up Layer dialog
6> Select the Tick Labels tab and then change the Type drop-down from Numeric to Tick-indexed dataset
7> In the Dataset drop-down right below, select Data1_C and click OK

Now the right Y axis will have tick labels that correspond to data in col(C) and these labels will be at same tick positions as the left Y axis

Cosmetic:
8> Double-click on left Y axis to bring up Layer dialog
9> Click Scale tab and set # Minor Ticks to 0
10> Click Grid Lines tab and turn on Major Grids and click OK to close dialog

Is this what you are looking for?

Easwar
OriginLab



gt205v6 Posted - 11/20/2005 : 02:06:16 AM

quote:

Hi Hakki:

It's not entirely clear what you want but let me suggest the following.

If you have two datasets (columns) in Origin they are considered distinct data so that they will each be plotted as separate curves. However, you can use the double-Y plotting template to plot your data and after which you'll see two separate curves but you can change curves from line+symbol to scatter plot. Then you'll have the data in one plot with each dataset referenced (color coded) to appropriate y-axis. With complicated data this could cause a confusing display so care will needed to taken to make sure that the viewer can clearly make the correct interpretation of the your data.

I hope this helps.

FRED




Dear Fred,

Lemme revise my question :) Assume you have two datasets of y which are linearly correlated. Assume a data set like this :

x y1 y2
1 2 4
2 4 8
3 6 12

When you plot this data with double-y plot there are two separate curves with different color. My question is, since this data is linear, why not just use 1 curve and adjust the scale of the axis according to that. I can do this manually myself. I can adjust either y1 or y2 axis until the two y curves match. Isn't there any easier way to do this? I sometimes need this in my research to show that the y1 and y2 data is linearly correlated.

I hope i was clear this time,
Thank you very much for your time

Hakki

Edited by - gt205v6 on 11/20/2005 02:08:29 AM
fzimnoch Posted - 11/18/2005 : 3:41:31 PM
Hi Hakki:

It's not entirely clear what you want but let me suggest the following.

If you have two datasets (columns) in Origin they are considered distinct data so that they will each be plotted as separate curves. However, you can use the double-Y plotting template to plot your data and after which you'll see two separate curves but you can change curves from line+symbol to scatter plot. Then you'll have the data in one plot with each dataset referenced (color coded) to appropriate y-axis. With complicated data this could cause a confusing display so care will needed to taken to make sure that the viewer can clearly make the correct interpretation of the your data.

I hope this helps.

FRED

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