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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 LabTalk NumericFormat of plotted Data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

TimmH

Germany
11 Posts

Posted - 06/10/2015 :  03:43:07 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6 32Bit
Operating System: Win7 64Bit SP1

Hello everyone,

i'm using templates to plot XYZ-Data via LabTalk.

plotxyz iz:=AcousticPlot plot:=243 ogl:=<new template:=%OTemplates\Graphs\AcousticMap1>;


It works fine, but the "Z-Data" in the plot is shown in the wrong numeric Format and with a % as Suffix.
Can i Change this with LabTalk-Code? I want to Show 3 Digits without a Suffix. The z-Values are float values.

Is it possible to add a "Fire"-Palette to the plot?

Thanks for your help.

Best regards

TimmH

SeanMao

China
288 Posts

Posted - 06/10/2015 :  05:35:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The LabTalk command to access color scale properties as you have requested have not implemented yet.

Therefore you have to customize the template to display exactly the way you want and then save it as template for re-usage.

About adding palette to plot, you can checkout command:

layer.cmap.load(file,option=0);


to load a *.pal or *.xml file as palette.

See this page below for reference:
http://www.originlab.com/doc/LabTalk/ref/Layer-CMap-obj

Regards!

Sean

OrignLab Tech. Service
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/10/2015 :  05:44:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your help so far, but when i create a Diagramm template, where can i Change the numeric Format of my z-values? not the scaling Details!

Regards

TimmH
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/10/2015 :  06:01:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

To change the significant digits, you can double click on the graph to open Plot Details dialog. Expand node on left panel to go to plot level, then click "Numeric Formats" tab on the right panel.

You will see the settings in Numeric Formats group.

Regards!

Sean
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/10/2015 :  06:04:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
i want to set the numeric Format of my values BEFORE Evaluation - i create the plots via labtalk script and i have to set the numeric Format in the script. Or maybe when creating the template - but how ?!
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/10/2015 :  06:13:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

For this setting, the LabTalk command is:


layer.plot1.numericformats.digits = 3;


Regards!

Sean
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/10/2015 :  06:16:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The reference page for Layer.plotn is in page below:

http://www.originlab.com/doc/LabTalk/ref/Layer-Plotn-NumericFormats-obj

Regards!

Sean
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/10/2015 :  06:31:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That is what im searching for - thank u so much sean :-)
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/10/2015 :  06:58:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Note: Replace n with the data list number of the contour plot you want to edit.

With
layer.plot1.numericformats.digits = 3;


im getting this error in OriginLab: LAYER.PLOT1.NUMERICFORMATS.DIGITS is illegal name for defining a variable
unknown error in expression assignment

Why? :<
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/10/2015 :  08:18:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Some suggestions pls :(

	wks.col5.type = 4;
	wks.col6.type = 1;
	wks.col27.type = 6;

	Page.Active$=%(map_page$);
	Range zValues = col(27);
	Range zValues2 = col(26);			
	Range effPlot = (5,7);
	Range AcousticPlot = (5,6,27);		
	Range AcousticPlot2 = (5,6,26);		
	
	plotxy iy:=effPlot plot:=202 ogl:=<new template:="%OTemplates\Graphs\xxx">;
	layer.show=0;
	
	plotxyz iz:=AcousticPlot plot:=243 ogl:=<new template:=%OTemplates\Graphs\AcousticMap1>;	
	
	plotxyz iz:=AcousticPlot2 plot:=243 ogl:=<new template:=%OTemplates\Graphs\AcousticMap2>;


so.. what is my Data list number here? o.O i dont get it

Edited by - TimmH on 06/10/2015 08:19:40 AM
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/10/2015 :  9:49:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Plot index "n" here refer to nth data plot in current active layer. For a contour plot, there is only one layer and one data plot so "n" is 1 always.

But since this command only works for active plot, so you have to run this command every time you created a new figure.

Regards!

Sean

Edited by - SeanMao on 06/10/2015 9:53:06 PM
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/11/2015 :  01:15:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Still not working.. where's my mistake?

	plotxy iy:=effPlot 	
		plot:=202 	
			ogl:=<new template:="%OTemplates\Graphs\Standard">;
	layer.show=0;

	plotxyz iz:=AcousticPlot
		plot:=243
			ogl:=<new template:=%OTemplates\Graphs\AcousticMap1>;	
	layer.plot1.numericformats.digits = 3;

	plotxyz iz:=AcousticPlot2										
		plot:=243
			ogl:=<new template:=%OTemplates\Graphs\AcousticMap2>;		
	layer.plot1.numericformats.digits = 3;
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/11/2015 :  01:49:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Would you mind send your opj and graph template to tech@originlab.com so that I can try on my side?

Thanks!

Regards!

Sean
Go to Top of Page

TimmH

Germany
11 Posts

Posted - 06/11/2015 :  01:53:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey - sorry i cant send this, but its working now!

	plotxy iy:=effPlot plot:=202 ogl:=<new template:="%OTemplates\Graphs\Standard">;
	layer.show=0;

	plotxyz iz:=AcousticPlot plot:=243 ogl:=<new template:=%OTemplates\Graphs\AcousticMap1>;	
	layer2.plot1.numericformats.subformat=1;
	layer2.plot1.numericformats.digits = 3;
	layer2.plot1.contourlabels.color=1;
	layer2.plot1.contourlabels.size=10;
	layer2.plot1.numericformats.suffix$=dB;

	plotxyz iz:=AcousticPlot2 plot:=243 ogl:=<new template:=%OTemplates\Graphs\AcousticMap2>;		
	layer3.plot1.numericformats.digits = 3;
	layer3.plot1.contourlabels.color=1;
	layer3.plot1.contourlabels.size=10;
	layer3.plot1.numericformats.suffix$=g;


Just wrote layer2 .. layer3..!

Thanks for your help :)
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/11/2015 :  01:59:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Great!

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000