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 for Programming
 Forum for Origin C
 how to access plotting parameters

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
olsy Posted - 10/19/2011 : 10:45:29 AM
Origin Ver. and Service Release (Select Help-->About Origin): pro8.5
Operating System: Win7

hi to everybody!
Again the problem appeared in my first program in Ogirin C.
I am trying to build 6 graphs. Till now I´ve found only one way to do it and use it but I still need to define some parameters as legend, line color and thickness, symbol type, scale number size and so on...
This is the code i use for plotting:

Worksheet wksdata("[Sun-Results.xls]Statistics");
   GraphPage gp;
gp.Create("Origin");
 
while(gp.Layers.Count() < 6)
{
    gp.AddLayer();
}
 
graph_arrange_layers(gp, 3, 2);
// Add XY data from worksheet to graph each layers

int index = 4;
foreach(GraphLayer gl in gp.Layers)
{
    DataRange dr;
    dr.Add(wksdata, 1, "X");
    dr.Add(wksdata, index+1, "Y");
    
    if( gl.AddPlot(dr, IDM_PLOT_LINESYMB) >= 0 )
        gl.UngroupPlots(0);  // ungroup plots
    	gl.Rescale();
    
    index++;

}


How i can improve it with all plotting settings and maybe separate them and get plots one by one?
4   L A T E S T    R E P L I E S    (Newest First)
olsy Posted - 10/24/2011 : 09:31:32 AM
Thank you Penn!
I got what i was need )
Penn Posted - 10/20/2011 : 10:17:47 PM
Hi,

You can use Tree Format to set the size of X and Z axes' labels. If you don't know the format tree of the axis, see this example.

About the size of legend, actually, the legend is graph object, you can refer to this page.

The following example shows how to change the size:

void changeSize()
{
	GraphLayer gl = Project.ActiveLayer();
	if(!gl)
		return;
	
	Axis aX = gl.XAxis;  // x axis
	Axis aZ = gl.ZAxis;  // z axis
	
	if(!aX || !aZ)
		return;
	
	Tree trXFormat, trZFormat;
	trXFormat.Root.Labels.BottomLabels.Font.Size.nVal = 36;  // set X axis label size
	trZFormat.Root.Labels.FrontLabels.Font.Size.nVal = 36;  // set Z axis label size
	
	int nXErr = aX.UpdateThemeIDs(trXFormat.Root);
	int nZErr = aZ.UpdateThemeIDs(trZFormat.Root);
	if((nXErr == 0) && (nZErr == 0))
	{
		aX.ApplyFormat(trXFormat, true, true);
		aZ.ApplyFormat(trZFormat, true, true);
	}
	
	GraphObject goLegend = gl.GraphObjects("Legend");  // get the legend
	if(!goLegend)
		return;
	
	Tree trLegendFormat;
	trLegendFormat.Root.Font.Size.nVal = 36;  // set size
	if(0 == goLegend.UpdateThemeIDs(trLegendFormat.Root))
		goLegend.ApplyFormat(trLegendFormat, true, true);
}


Penn
olsy Posted - 10/20/2011 : 10:17:47 AM
Thanks Penn! Helped a lot )
but i still have not find how to change the size of X and Z Axis numbers. I would like to increase them from 18 to 36 Point...and the same with Legend letters size.

Do you maybe have an idea?
Penn Posted - 10/19/2011 : 10:00:27 PM
Hi,

You can refer to the following examples: Legend Update, Line Plot, Symbol Plot, Plotting, and Graphing.

Penn

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