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
 Origin Forum
 Divide by factor on Tick label

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
tomegaspadas Posted - 01/13/2020 : 7:02:53 PM
Origin Ver. and Service Release (Select Help-->About Origin): 9.5
Operating System:Windows 10
Hello guys, is there any way where I can auto format by factor on the tick label? I mean when I import my files I got every thing in scentific notation, then I habe to divide by factor o 100000, but I have a ton of files... so... theres a way that I can do that auto every time I import a file? Thank!
4   L A T E S T    R E P L I E S    (Newest First)
tomegaspadas Posted - 01/17/2020 : 10:43:28 AM
quote:
Originally posted by JacquelineHe

Hi,

I want to confirm that your original data is "9E6", when you import data you want the data divide by factor of 100000 and NOT need show as scientific notation, right?

If so, it should be shown as "90" but not "500".

And this script is used to set the dataset to scientific notation
wks.col$(ii).subformat = 2;


If you not need to show the data to scientific notation, you just need to remove it in the script.

If I misunderstand your question, could you please show us more detail about it?

Thanks
Jacqueline
OriginLab



exactly that!!! thank you
JacquelineHe Posted - 01/15/2020 : 03:21:10 AM
Hi,

I want to confirm that your original data is "9E6", when you import data you want the data divide by factor of 100000 and NOT need show as scientific notation, right?

If so, it should be shown as "90" but not "500".

And this script is used to set the dataset to scientific notation
wks.col$(ii).subformat = 2;


If you not need to show the data to scientific notation, you just need to remove it in the script.

If I misunderstand your question, could you please show us more detail about it?

Thanks
Jacqueline
OriginLab
tomegaspadas Posted - 01/14/2020 : 06:33:56 AM
quote:
Originally posted by JacquelineHe

Hi,

If I do not misunderstand your question, you hope the imported data divide by 100000, and column display set to "Scientific:1E3" when you import them.


If you use the "Import Multiple ASCII" tool to import file, open the import "impASC" dialog, and then expand "Script" node, enter the following Labtalk script in the "Script after Each File Imported" edit box. Then import the files.


int ncols = wks.ncols;
for(int ii = 1; ii<=ncols; ii++)
{
   col($(ii))=col($(ii))/100000;
   wks.col$(ii).subformat = 2;
}


Then all imported data will divide by 100000, and column display set to "Scientific:1E3"

Thanks
Jacqueline
OriginLab



Exactly that, but with out the scientific notation, for example: "9E6" them divide by factor of 100000 and it turns into 500"
I want this to happen in the ploted graph and in the woorksheet. Thank you!
ps: the script works perfectly, now how I change the display in the worksheet? In the graph is working well :)
ps2: change it in the woorksheet as I import the files. :D
JacquelineHe Posted - 01/14/2020 : 03:21:02 AM
Hi,

If I do not misunderstand your question, you hope the imported data divide by 100000, and column display set to "Scientific:1E3" when you import them.


If you use the "Import Multiple ASCII" tool to import file, open the import "impASC" dialog, and then expand "Script" node, enter the following Labtalk script in the "Script after Each File Imported" edit box. Then import the files.


int ncols = wks.ncols;
for(int ii = 1; ii<=ncols; ii++)
{
   col($(ii))=col($(ii))/100000;
   wks.col$(ii).subformat = 2;
}


Then all imported data will divide by 100000, and column display set to "Scientific:1E3"

Thanks
Jacqueline
OriginLab

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