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 Automation Server/COM and LabVIEW
Loading the template to plot through Matlab
Note:
Only the poster of this message, and the Moderator can edit the message.
Screensize:
640 x 480
800 x 600
1024 x 768
1280 x 1024
UserName:
Password:
Anti-Spam Code:
Format Mode:
Basic
Help
Prompt
Format:
Font
Andale Mono
Arial
Arial Black
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Georgia
Impact
Lucida Console
Script MT Bold
Stencil
Tahoma
Times New Roman
Trebuchet MS
Verdana
Size
1
2
3
4
5
6
Color
Black
Red
Yellow
Pink
Green
Orange
Purple
Blue
Beige
Brown
Teal
Navy
Maroon
LimeGreen
Forum:
Forum for Automation Server/COM and LabVIEW
Subject:
Message:
* HTML is OFF
*
Forum Code
is ON
Smilies
Hello: I import the data from [b]matlab[/b] into [b]originlab 2018[/b] to draw. I created a template about drawing styles for "[b]Stacked lines by Y Offsets[/b]" styles. Then load the template in MATLAB to plot, but in the resulting figures, all the curves overlap, like the normal [b]multi-Y-axis [/b]pattern, and don't draw like "[b]Stacked lines by Y Offsets[/b]" 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);
Check here to subscribe to this topic.
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000