0

128 個のビンで FFT の結果を表示しようとしていますが、次のようにして新しいデータを追加すると:

DataVisualization::Charting::Series^ series = m_chart->Series[0];
series->Points->DataBindY(m_dataBuffer);
m_chart->Refresh();

...スペクトルに 1 から 128 までのラベルを付けます。これらのラベルで 0 から 127 を読み取る必要があります。これを達成する最も簡単な方法は何ですか?

4

1 に答える 1

2

他の誰かがこれらの線に沿って何かをしたい場合に備えて、カスタム ラベルを使用して行うことができます。

System::Windows::Forms::DataVisualization::Charting::ChartArea^ chartArea1 = this->m_chart->ChartAreas[0];
for( int i = 0; i < 128; i += 16 )
{
    System::Windows::Forms::DataVisualization::Charting::CustomLabel^  customLabel1 = (gcnew System::Windows::Forms::DataVisualization::Charting::CustomLabel());
    customLabel1->FromPosition = i-1.5;
    customLabel1->Text = (i).ToString();
    customLabel1->ToPosition = i+1.5;
    chartArea1->AxisX->CustomLabels->Add(customLabel1);
}
于 2011-01-10T14:06:48.310 に答える