02-16-2006 09:57 AM - edited 02-16-2006 09:57 AM
For example,
oPlot.Data[0] = 8.9950000000005321
oPlot.Data[1] = 8.9950001600005329
When I graph the data, my X axis only displays increments of 8.995. Only 3 decimal places. I wish to display more decimal places and having difficulty figuring this out.
Some settings I have set:
// Here I set the range
oXRange = new NationalInstruments.UI.Range(8.9949999999999999, 8.9951111111111111);
xAxis1.Range = oXRange;
// here I attempt to mess with some formatting
System.Globalization.NumberFormatInfo oFormat = new System.Globalization.NumberFormatInfo();
oFormat.NumberDecimalDigits = 16;
xAxis1.EditRangeNumericFormatMode = NationalInstruments.UI.NumericFormatMode.CreateSimpleDoubleMode(16, oFormat);
xAxis1.AutoSpacing = false;
xAxis1.Mode = NationalInstruments.UI.AxisMode.Fixed;
yAxis1.AutoSpacing = false;
yAxis1.Mode = NationalInstruments.UI.AxisMode.Fixed;
//This is my actual call to graph the data, gphResults is my measurement studio graph.
Message Edited by Toedwy on 02-16-2006 09:57 AM
02-19-2006 09:13 PM
Matt,
It seems you looked around all over the API for a way to get all the decimal places you were looking for. Fortunately, defining the format of the Y Axis label is a lot easier than what you tried to do. The Y Axis contains a Major Divisions collection which includes the LabelFormat property. By using this property you can get way more than 3 decimals. I tested it with the 16 decimals places you were looking for (by the way, that is one accurate instrument!). This is an example that shows how you can define the format of Y Axis label.
targetAxis.MajorDivisions.LabelFormat = New FormatString("F16", FormatStringMode.Numeric)
Regards,
Santiago D