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 set Line+Scatter plot type?

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
liujibao Posted - 05/18/2004 : 08:20:14 AM
How to set Line+Scatter plot type in origin C?
I only know how to set Line or Scatter type:
AddPlot(curve,IDM_PLOT_LINESYMB)
AddPlot(curve,IDM_PLOT_SCATTER)
6   L A T E S T    R E P L I E S    (Newest First)
rlewis Posted - 06/14/2004 : 6:34:51 PM
You can also try something like the following ...


bool SetSymbolSize(int SymbSize)
{
GraphPage gP=Project.Pages(-1);
GraphLayer gL=gP.Layers();
if(gL.IsValid())
{
DataPlot dP=gL.DataPlots(-1);
Tree tR;
tR=dP.Curve;
tR.Symbol.Size.nVal=SymbSize;
dP.Curve=tR;
gP.SetShow();
return (true);
}
return (false);
}
Mike Buess Posted - 06/09/2004 : 2:07:49 PM
I don't think there's an Origin C method for changing the symbol size so you need to use LabTalk (set -z)...
void SetSymbolSizes(int symbolSize)
{
GraphLayer gl = Project.ActiveLayer();
string strCmd;

foreach ( DataPlot dp in gl.DataPlots )
{
strCmd.Format("set %s -z %d;",dp.GetDatasetName(),symbolSize);
gl.LT_execute(strCmd);
}
}


Mike Buess
Origin WebRing Member
liujibao Posted - 06/09/2004 : 10:54:34 AM
oh,Thanks a lot!

but how to set symbol size ?
Mike Buess Posted - 05/27/2004 : 08:56:50 AM
Yes, the definitions were moved in Origin 7.5 but haven't changed. The ID numbers are the same as those used with LabTalk's "worksheet -p" command.

Mike Buess
Origin WebRing Member
evanm Posted - 05/27/2004 : 08:12:05 AM
But if you are using Origin 7, plot types are defined in the file OC_const.h
Mike Buess Posted - 05/18/2004 : 09:09:07 AM
Plot types are defined in oPlotIDs.h. These are the common types...

#define IDM_PLOT_LINE 200 // Line
#define IDM_PLOT_SCATTER 201 // Scatter
#define IDM_PLOT_LINESYMB 202 // Line+Symbol (perhaps your symbol size was 0?)
#define IDM_PLOT_COLUMN 203
#define IDM_PLOT_AREA 204
#define IDM_PLOT_HILOCLOSE 205
#define IDM_PLOT_BOX 206

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/18/2004 09:54:18 AM

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