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
 LabTalk Forum
 plot histogram using labtalk

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
Konrad_Loehr Posted - 07/27/2017 : 06:42:29 AM
Origin Ver. 2017
Operating System: Win7

Hi everybody! :)

I would like to plot data in a histogram using labtalk.
I already noticed the histogram function
http://www.originlab.com/doc/LabTalk/ref/Histogram-func
, but I would like to use the 'plot Histogram' function I know from the user interface, since it defines bins etc. automatically and can be adjusted using a graphical interface later on.

Is that possible?

Best
Konrad

Konrad Loehr
3   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 08/07/2017 : 11:58:11 AM
Hi Konrad Loehr,

> How to get the short name of the workbook to create the range?

You can use the long name to define the range. When you need the short name (like for Window command),
you can get it by <range>.name$ . The following sample snippet worked:
bk$="1_to_1000_dilution.txt";
range rs = [%(bk$)]1!;  //1st sheet
rs.colSel(2,1);  //highlight 2nd column in the sheet
bkshortname$=rs.name$;
window -a %(bkshortname$);
worksheet -p 219 Hist;
Hope this helps.

--Hideo Fujii
OriginLab

Konrad_Loehr Posted - 08/03/2017 : 09:05:54 AM
Hi Hideo Fujii,

thank you a lot for you quick reply! - it does exactly, what I wanted :)

But that brings up a new problem:
I want to import data using the import wizard and by such I don't know the name of my workbook, as I'm importing several files and want to name their workbooks using the original filenames. ("Rename: workbook with filename" is checked in import wizard gui). For example if a file is called "1_to_1000_dilution.txt", the long name will be the same, and the short name will be "A1100dilutio". How to get the short name of the workbook to create the range?

Konrad Loehr
Hideo Fujii Posted - 07/27/2017 : 12:06:44 PM
Hi Konrad Loehr,

The following sample snippet can do:
bk$="Book1";
range rs = [%(bk$)]1!;  //1st sheet
rs.colSel(2,1);  //highlight 2nd column in the sheet
window -a %(bk$);
worksheet -p 219 Hist;
Does this work in your code?

--Hideo Fujii
OriginLab

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