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
 Axis 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
newuser_ca Posted - 08/14/2012 : 1:10:25 PM
OriginPro 8.6 in win 7

Hi,

I have a plot with Date as X. I want to display date "8/8/2012" as "TEST". I used the following codes:
tr.Root.Labels.BottomLabels.Custom.Special.Type.nVal = 3;
tr.Root.Labels.BottomLabels.Custom.Special.Label.strVal = "TEST";
tr.Root.Labels.BottomLabels.Custom.Special.Value.dVal = 2456147; // 2456147 is Julian Day for 8/8/2012


However, I got it on the day "8/11/2012". I noticed that, date value "2456147" was translated "2.45615E6". It was rounded to "2456150". See attached picture.

How to solve this?

Question2:
I have a plot with Date as X axis. I want to display the date smart. the date range could be a few hours up to a few years. I think I could write a lot of "if" to define the increament value using:
tr.Root.Scale.IncrementBy.dVal = 0;
tr.Root.Scale.Value.dVal = SOMEVALUE;


but, when the user zoom in/out, the X-axis is very ugly. see post:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=10552

So, I use another way:
tr.Root.Scale.IncrementBy.nVal = 1;
tr.Root.Scale.MajorticksCount.nVal = 7;


and X axis is not readable friendly:


Is there a way to display it smartly like only at the time "00:00" or "12:00". How to display 2 lines of X axis tick label?
See pictures below: (I did this in windows Paint, not from Origin. :))

2   L A T E S T    R E P L I E S    (Newest First)
newuser_ca Posted - 08/16/2012 : 2:02:47 PM
Thanks a lot.
Penn Posted - 08/14/2012 : 11:28:30 PM
Hi,

Q1:
This is a bug, and We will try to fix it. This problem is brought up by the scientific notation of the value. By default, Origin will convert the value into scientific notation when upper threshold power is 6. Now, the Julian value is converted, which make it rounded. The workaround is:
1. Click menu Tools: Options to open the Options dialog.
2. Go to the Numeric Format tab, set Upper Threshold Power to 8, or bigger.

Q2:
You can try

tr.Root.Scale.IncrementBy.dVal = 0;
tr.Root.Scale.Value.strVal = "0.5day";

When zoom in the graph, the labels will change accordingly, which will make the label not display at "00:00" and "12:00". Currently, it seems no way to display in two lines.

Penn

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