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 for Programming
 Forum for Origin C
 How to create Double-Y graph?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

liujibao

China
Posts

Posted - 12/15/2003 :  08:25:00 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Can origin 7.5 do this?
who can tell me?
Thanks

easwar

USA
1965 Posts

Posted - 12/15/2003 :  11:34:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I presume you are asking for Origin C code to make a DoubleY plot. If yes, you can use code like the one pasted below.

If you just want to make Double Y graph using GUI, first create a worksheet with X,Y,Y column, place your data in those columns, click and select the two Y columns, and then use the menu item:
Plot|Special Line and Symbol|Double-Y

Easwar
OriginLab.




void test()
{
// Declare worksheet page using active page
WorksheetPage wksPg = Project.Pages();
// Declare worksheet as layer 0 of worksheet page
Worksheet wks = wksPg.Layers(0);
// If worksheet is not valid, print error and return
if(!wks)
{
printf("Active window is not a worksheet!\n");
return;
}

// Declare two curves using cols 1-2 and cols 1-3 for the two Ys
Curve crv1(wks, 0,1);
Curve crv2(wks, 0, 2);
// If either curve is not a valid object, print error and return
if(!crv1 || !crv2)
{
printf("Invalid curve object(s)!\n");
return;
}

// Create new graph page using DoubleY template
GraphPage gpg;
gpg.Create("DOUBLEY");
// Declare graph layers 1 and 2
GraphLayer gly1 = gpg.Layers(0);
GraphLayer gly2 = gpg.Layers(1);
// Add curve 1 to layer 1 and curve 2 to layer 2, and rescale both
gly1.AddPlot(crv1);
gly1.Rescale();
gly2.AddPlot(crv2);
gly2.Rescale();
}


Go to Top of Page

liujibao

China
Posts

Posted - 12/16/2003 :  07:26:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks
I will try these.
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