本文整理匯總了C#中ZedGraph.GraphPane.AddY2Axis方法的典型用法代碼示例。如果您正苦於以下問題:C# GraphPane.AddY2Axis方法的具體用法?C# GraphPane.AddY2Axis怎麽用?C# GraphPane.AddY2Axis使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ZedGraph.GraphPane
的用法示例。
在下文中一共展示了GraphPane.AddY2Axis方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Form1_Load
//.........這裏部分代碼省略.........
PointPairList list2 = new PointPairList();
for ( int i=0; i<100; i++ )
{
double x = (double) i;
double y = Math.Sin( i / 8.0 ) * 100000 + 150000;
double y2 = Math.Sin( i / 3.0 ) * 300 - 400;
list.Add( x, y );
list2.Add( x, y2 );
//double z = Math.Abs( Math.Cos( i / 8.0 ) ) * y;
}
LineItem myCurve = myPane.AddCurve( "curve", list, Color.Blue, SymbolType.Diamond );
LineItem myCurve2 = myPane.AddCurve( "curve2", list2, Color.Red, SymbolType.Diamond );
myCurve2.IsY2Axis = true;
myPane.Y2Axis.IsVisible = true;
AlignYZeroLines( myPane, 12 );
myPane.YAxis.IsMinorOppositeTic = false;
myPane.Y2Axis.IsMinorOppositeTic = false;
trackBar1.Minimum = 0;
trackBar1.Maximum = 100;
trackBar1.Value = 50;
#endif
#if false // Basic curve test - Multi-Y axes
myPane = new GraphPane( new RectangleF( 0, 0, 640, 480 ), "Title", "XAxis", "YAxis" );
myPane.AddYAxis( "Another Y Axis" );
myPane.AddY2Axis( "Another Y2 Axis" );
myPane.Y2Axis.Title.Text = "My Y2 Axis";
myPane.Y2AxisList[0].IsVisible = true;
myPane.Y2AxisList[1].IsVisible = true;
PointPairList list = new PointPairList();
for ( int i=0; i<100; i++ )
{
//double x = (double) i;
double x = new XDate( 2001, 1, i*3 );
double y = Math.Sin( i / 8.0 ) * 100000 + 100001;
list.Add( x, y );
double z = Math.Abs( Math.Cos( i / 8.0 ) ) * y;
}
LineItem myCurve = myPane.AddCurve( "curve", list, Color.Blue, SymbolType.Diamond );
myCurve.YAxisIndex = 1;
myPane.XAxis.IsSkipLastLabel = false;
myPane.XAxis.Type = AxisType.DateAsOrdinal;
myPane.AxisChange( this.CreateGraphics() );
trackBar1.Minimum = 0;
trackBar1.Maximum = 100;
trackBar1.Value = 50;
#endif
#if false // Basic curve test - Date Axis w/ Time Span
myPane = new GraphPane( new RectangleF( 0, 0, 640, 480 ), "Title", "XAxis", "YAxis" );