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
 Paste link manipulation

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
Slapgravel Posted - 11/15/2017 : 05:37:30 AM
I have lots of distribution graphs to make (approx 50) and I'd like to make a template, so I can paste the data to a workbook and it makes the graph automatically.

I'm using a histogram and the lognormal curve from the 'data' tab in plot properties, which outputs to a new sheet in the same book. The issue with this is that the mean and SD appears in the comments of the column in the new sheet and I'd like to display them on the graph along with the total number of data points used. I've made a text box with this text:

----------------------

Total: %(1,@RN)
Mean: %([Book3]"Book3_G Bins",@WL,C[C])
ln sd:

----------------------

Which returns:

----------------------

Total: 113
Mean: ln mean= 8.4836126687284, ln sd=0.5420818835442
ln sd:

----------------------

In a perfect world, I would like the return to read:

----------------------

Total: 113
Mean: 4834.885
ln sd: 0.542

----------------------

Where I can separate the (truncated) mean and SD onto different lines and get the actual value of just the mean by using e^(ln mean). Is this achievable? I'll take splitting the values onto 2 lines at a push and just display ln mean if I can't actually manipulate the value.

Maybe the values output to somewhere else I can grab them from?

Any help would be much appreciated.

Origin Ver. 2015 and Service Release 2:
Operating System: Win 10
3   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 11/16/2017 : 10:00:04 AM
Hi,

The script calculates the mean of Col(B) of the first worksheet of "Book1". You can change it to "Book1_B@2" if you are looking for the second worksheet instead.

James.
Slapgravel Posted - 11/16/2017 : 05:57:12 AM
Hi James,

Thanks for your reply.

Could you please let me know where "$(mean(ln(Book1_B)),.3)" calculates it's mean from? The lognormal distribution gives different values to the ones that appear when I input your code.

Instead of ln Mean = 8.348 and s = 0.542, I get ln mean = 14.035 and s = 0.512.

Thanks.
YimingChen Posted - 11/15/2017 : 5:46:36 PM
Hi,

Presume you have your raw data stored in [Book1]Sheet1!col(B), then you can enter the following into your text box in the graph:

---
Total: $(count(ln(Book1_B)))
Mean: $(mean(ln(Book1_B)),.3)
ln sd: $(stddev(ln(Book1_B)),.3)
---

Thank you,

James

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