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 set the properties of boxplot?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

milkbou

Taiwan
18 Posts

Posted - 03/16/2004 :  01:02:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I can draw boxplot and set the properties of pattern, box, percentile,data, group tabs by Plot Details dialog, but how can set those properties by Origin C?

Best Regards,

Iris_Bai

China
Posts

Posted - 03/16/2004 :  06:12:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Lin,

Now, I just can show how to change the settings in Pattern and spacing Tab in Plot Details dialog. The following function changed the setting by Tree that provided by Theme.
void scatter_plot(string strGraph, int ntype)
{
GraphLayer glay = Project.ActiveLayer();
if(!glay)
return;
DataPlot dp = glay.DataPlots(0);
Tree tr;
tr = dp.Curve; // get the internal Curve branch of Theme Tree, you can use "out_tree(tr);" to output the tree to view the structure
tr.Pattern.Border.Color.nVal = ntype; // set border color, same as in Theme
dp.Curve = tr; // update surface branch from tree
}

void test()
{
int nType = 14; //Orange, or the following line
// int nType = RGB(255,128,0) | OCOLOR_RGB_FLAG_BIT;
scatter_plot("Graph1", nType);
}


Please get more codes regarding setting from:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=2909

To know about Theme:
1. Right click on Graph and select Save Format As Theme...
2. In opening dialog, click Filters button(pencil), you will see a Tree including some settings.
3. You can set all feature in the tree in your codes like the above.

Iris
Go to Top of Page

milkbou

Taiwan
18 Posts

Posted - 03/16/2004 :  9:48:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Iris,
Thanks for your answer, I've tried and it works.
Most properties of Plot Details can be set by the tree, but seem got no ways to set some special ones, such as "box", "data" tab of boxplot. It will be a pity if those ones can be changed dynamically by OriginC because plot boxplot with both box & data is a simple and clear way to review data.
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