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
 How do I access the custom tick labels tab?

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
Shemini Posted - 06/08/2010 : 5:18:29 PM
I have been trying to write code that will make the tick labels have no decimal places only at the point 0. This can be done in the Axis dialog using the custom tick labels tab but I need to access this tab through code. on the wiki it has an example but I tried testing that example and it didn't work for me.

Please advise...
Thank you
6   L A T E S T    R E P L I E S    (Newest First)
mulisa Posted - 06/20/2010 : 02:17:00 AM
Here you can find what do you want
http://www.brideswardrobe.com/prices-drop.php
Shemini Posted - 06/10/2010 : 11:54:14 AM
Hi Penn,

Yes, that did fix it. Thank you very much.

Shemini
Penn Posted - 06/09/2010 : 10:39:56 PM
Hi,

I am afraid that you are not using Origin 8 SR6. You can update to SR6 from this page and have a try again.

Penn
Shemini Posted - 06/09/2010 : 09:55:51 AM
Hi Penn,

Thank you very much for your help. When I try this code it gives an error from

aX.UpdateThemeIDs(trFormat.Root);

Maybe there is something I am missing. When it prints the tree there is no TreeNode called Custom or Special under the BottomLabels Node. I am not very good yet with using Trees, and so far I have not been able to make a node that was not there previously without errors. Any further help would be greatly appreciated.

Thank you
Penn Posted - 06/08/2010 : 10:45:27 PM
Hi,

To access the format tree of axis you want, you can get the format tree and output this format tree after setting in GUI. In your issue, you can done in the Axis dialog using the Custom Tick Labels tab, and then run the following code.

void accessSpecialLabel()
{
	GraphLayer gl = Project.ActiveLayer();
	if(!gl)
		return;
	
	Axis aX = gl.XAxis;
	if(!aX)
		return;
	
	Tree trFormat;
	// need to change the Special setting to get the corresponding tree node
	trFormat = aX.GetFormat(FPB_ALL, FOB_ALL, TRUE, TRUE);  // get the tree format of X axis
	out_tree(trFormat);  // output tree format, then can see the tree node you want
	
	// set the tree node value you want
	trFormat.Root.Labels.BottomLabels.Custom.Special.Type.nVal = 3;  // set to Manual
	trFormat.Root.Labels.BottomLabels.Custom.Special.Label.nVal = 0;  // set label to 0, no decimal place
	trFormat.Root.Labels.BottomLabels.Custom.Special.Value.dVal = 0.0;  // value point to set
	
	int nErr = aX.UpdateThemeIDs(trFormat.Root);
	if(0!=nErr)
		out_str("Error");
	
	aX.ApplyFormat(trFormat, true, true, true);  // apply format to X axis
}

This page has provided some examples about how to access graph format with theme tree and they may be helpful.

Penn
Shemini Posted - 06/08/2010 : 5:29:19 PM
P.S. I am using version 8.0

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