NPlot.LabelAxis.AddLabel C# (CSharp) Method

AddLabel() public method

Adds a label to the axis
public AddLabel ( string name, double val ) : void
name string The label
val double The world value at which to place the label
return void
        public void AddLabel( string name, double val )
        {
            labels_.Add( name );
            numbers_.Add( val );
        }

Usage Example

コード例 #1
0
        private void TrackPartitionControl_Load(object sender, EventArgs e)
        {
            _labelDescription.Text = string.Format("From: {0:00}  To: {1:00}  Count: {2} ", _partition.MinFigure, _partition.MaxFigure, _partition.TotalNumberOfFigures);

            _graph.Clear();
            var sp = new LinePlot();
              //  var sp = new BarPlot();

            DataSet ds = _partition.CreateFrequenciesDataSet();
            sp.DataSource = ds;
            sp.AbscissaData = "Track";
            sp.OrdinateData = "Frequency";
            sp.Color = Color.Red;
            sp.Label = "Signal Frequency";
            _graph.Add(sp);

            var la = new LabelAxis(_graph.XAxis1);
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                la.AddLabel((string)row["TrackName"], (double)row["Track"]);
            }
            la.TicksLabelAngle = (float)90.0f;
            la.TicksBetweenText = true;
            _graph.XAxis1 = la;

            _graph.Invalidate();
        }
All Usage Examples Of NPlot.LabelAxis::AddLabel