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
 Create graph from origin C

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
naeem498 Posted - 10/24/2011 : 06:31:13 AM
Hi,

Can I make a graph using origin c coding. Actually, I have 44 workbooks and I want to make 44 graphs taking specific data set in each workbook. I want to use my own 'plot tempelate'.

I used the code given in the origin_c_programming book, but it does not work.

Thanks
1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 10/24/2011 : 9:47:49 PM
Hi,

About how to plot, please refer to Plotting. You can use your own template when creating a graph, and then add plot to this graph. For example, suppose the template is named "Line00":

void simple_line_plot_ex()
{    
	Worksheet wks = Project.ActiveLayer();  // get the active worksheet
	if( !wks )
	{	
		out_str("Please activate one worksheet with data");
		return;
	}	 
	GraphPage gp;
	gp.Create("Line00");  // create a graph with Line00 template
	GraphLayer gl = gp.Layers(0);  // layer 1 of the graph
	Curve crv(wks, 0, 1);
	int nPlot = gl.AddPlot(crv, IDM_PLOT_LINE); // add a line plot to the graph, return plot index
	if( nPlot >= 0 )
		gl.Rescale();  // rescale the graph
}


Penn

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