I used x-axis custom division of .NET waveform graph in order to plot 1/3 Octave spectrum as shown in attached picture. It works okay, but the spacing is not adjusted automatically. I checked autospacing property of XAxis collection, but it is set true. How can I make it?
I used 32-band custom frequencies. The following code shows how I added my custom scales.
private string [] freqDef = {"20","25","31.5","40","50","63","80","100","125","160",
"200","250","315","400","500","630","800","1k","1.25k","1.6k",
"2k","2.5k","3.15k","4k","5k","6.3k","8k","10k","12.5k","16k","20k","Total"};
// Define Custom Scale
AxisCustomDivision uiItem;
for (int m=this.iStartFreq; m<(iStartFreq+nAvgOctBnd-1); m++)
{
uiItem = new AxisCustomDivision((double)m,freqDef[m],CustomDivisionDisplayStyle.ShowText);
uiItem.TickColor = Color.Black;
wGraph.XAxes[0].CustomDivisions.Add(uiItem);
}
Thank you very much.