The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Loading the template to plot through Matlab

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
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
xlg786 Posted - 04/06/2019 : 04:17:42 AM
I import the data from matlab into originlab 2018 to draw. I created a template about drawing styles for "Stacked lines by Y Offsets" styles. Then load the template in MATLAB to plot, but in the resulting figures, all the curves overlap, like the normal multi-Y-axis pattern, and don't draw like "Stacked lines by Y Offsets" templates, and don't know what's wrong. The code is as follows.
% Set data to the columns
invoke(wks, 'SetData', x, 0, 0);
Temp ='D:\ OffsetStackY.otpu';
strGraph = invoke (originObj, 'CreatePage', 3,' Data',Temp);
% Find the graph layer.
gl = invoke (originObj, 'FindGraphLayer', strGraph);

% Get dataplot collection from the graph layer.
dps = invoke (gl, 'DataPlots');

% Create a data range.
dr = invoke (originObj, 'NewDataRange');

% Add data to data range.
Invoke (dr, 'Add',' X ', wks, 0,0,-1,0);
Invoke (dr, 'Add',' Y ', wks, 0,1,-1,1);
Invoke (dr, 'Add',' Y ', wks, 0,2,-1, 2);

% Add data plot to graph layer.
Invoke (dps, 'Add', dr,200);

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