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
 IDM_PLOT_ for Plot -> Specialized

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
dkudlay Posted - 11/18/2009 : 6:44:35 PM
How do I correlate the plot types listed in Plot->Special (Such as Vector XYAM) with IDM_PLOT_ values needed for AddPlot function?
6   L A T E S T    R E P L I E S    (Newest First)
dkudlay Posted - 11/20/2009 : 1:05:53 PM
Thank you Iris, I tried the Zoom Sample you posted, works like a charm, thanks.
Iris_Bai Posted - 11/19/2009 : 8:43:59 PM
quote:
Originally posted by dkudlay

Also, just wanted to add,
I was adding 2 plots to same graph. After using the LT_execute solution, I could not access the axis to manipulate them using Tree and GetFormat. To solve the problem, I Rescaled the first layer with my Plot, and then I got next layer, added a plot via LT_execute, changed the axis, and then rescaled that.



Hi,
I am not sure what you mean. If want to rescale the multiple layers in one graph, need to resacle layers one by one.
foreach(GraphLayer gl in gp.Layers)
{
    gl.Rescale();
}


Iris
Iris_Bai Posted - 11/19/2009 : 8:41:41 PM
quote:
Originally posted by dkudlay

Thanks again Iris, this worked very well. The only question I have, is I couldn't find the info on what the contents to the LT_execute command mean. I assume -P 208 is a plot Id and vector is a parameter to it. Where are the definitions for the special graph IDs? I am particularly interested in the Zoom and Polar/Rose types.



Hi,

worksheet -p is Latbalk Script, 208 is Plot ID, Vector is graph template, more details about worksheet command please reference to Labtalk Help.

Please see Origin C Plotting Examples, I added many new examples today, and will add more and more soon. This page included many plotting examples, for example Zoom Plot, Polar Plot, Wind Rose Plot, Vector XYAM Plot, Vector XYXY Plot and so on.

Iris
dkudlay Posted - 11/19/2009 : 7:37:16 PM
Also, just wanted to add,
I was adding 2 plots to same graph. After using the LT_execute solution, I could not access the axis to manipulate them using Tree and GetFormat. To solve the problem, I Rescaled the first layer with my Plot, and then I got next layer, added a plot via LT_execute, changed the axis, and then rescaled that.
dkudlay Posted - 11/19/2009 : 6:00:48 PM
Thanks again Iris, this worked very well. The only question I have, is I couldn't find the info on what the contents to the LT_execute command mean. I assume -P 208 is a plot Id and vector is a parameter to it. Where are the definitions for the special graph IDs? I am particularly interested in the Zoom and Polar/Rose types.
Iris_Bai Posted - 11/19/2009 : 01:43:41 AM
Hi,

Origin C GraphLayer::AddPlot not support this special plotting, you can use Labtalk.

Before running, need to hight-light columns.
void VectorPlot()
{
	Worksheet wks = Project.ActiveLayer();
	if( wks )// if active window is worksheet
	{		
		LT_execute("worksheet -P 208 vector");		
	}
}


The following Origin C codes help to select columns in worksheet:
void SetDataSelection()
{
	Worksheet wks = Project.ActiveLayer();
	if( wks )
	{
		Column col = wks.Columns(0);
		int nRows = col.GetUpperBound();
		
		vector<int> vR1, vR2, vC1, vC2;
		vR1.Add(0); // first row
		vR2.Add(nRows); // last row
		vC1.Add(0); // first column
		vC2.Add(3); // 4th column
		
		// to select 4 columns
		wks.SetSelectedRange(vR1, vC1, vR2, vC2);
	}
}


Iris

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