ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically control the X Axis Label Format

hey

i have a scatter plot, on which i am plotting various types of graph. i need to change the axis label format for each one, but i cannot seem to locate the property that controls this.

can anyone help?
0 Kudos
Message 1 of 5
(4,428 Views)

Hello Kreuters,

Can you explain in greater detail what you mean when you say 'label format'? What do you wish to have displaying as the X axis scale and what does it show at the moment?

Also which Measurement Studio objects are you working with in particular and which version do you have installed?

Tom
NIUK

0 Kudos
Message 2 of 5
(4,423 Views)

Hi Kreuters,

I assume you are talking about the
LabelFormat property associated with XAxis objects. That property is part of the MajorDivisions or MinorDivisions property of the particular x-axis object that you are working with. Now that we are clear on that, to change the LabelFormat programmatically, you could say:


 

// Remember that XAxes collection is zero-based
sampleWaveformGraph.XAxes[0].MajorDivisions.LabelFormat = new FormatString(FormatStringMode.Engineering, "ee0"); 

In the NI Measurement Studio Help, navigate to NI Measurement Studio Help >> NI Measurement Studio .NET Class Library >> Reference and then find the FormatString Class section. This has additional code snippets for you.

 

Hope this helps!

 

Best Regards,

Message Edited by Jonathan N on 05-16-2007 09:12 AM

Jonathan N.
National Instruments
0 Kudos
Message 3 of 5
(4,416 Views)
yes, that is exactly what i was after, thanks.
0 Kudos
Message 4 of 5
(4,405 Views)

Thanks Jonathan. Very clear and complete explanations !

 

Éric

0 Kudos
Message 5 of 5
(3,595 Views)