當前位置: 首頁>>代碼示例>>C#>>正文


C# MasterPane.AutoPaneLayout方法代碼示例

本文整理匯總了C#中ZedGraph.MasterPane.AutoPaneLayout方法的典型用法代碼示例。如果您正苦於以下問題:C# MasterPane.AutoPaneLayout方法的具體用法?C# MasterPane.AutoPaneLayout怎麽用?C# MasterPane.AutoPaneLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ZedGraph.MasterPane的用法示例。


在下文中一共展示了MasterPane.AutoPaneLayout方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Form1_Load


//.........這裏部分代碼省略.........
            {
                // Create a new graph with topLeft at (40,40) and size 600x400
                GraphPane myPaneT = new GraphPane( new Rectangle( 40, 40, 600, 400 ),
                    "Case #" + (j+1).ToString(),
                    "Time, Days",
                    "Rate, m/s" );

                myPaneT.PaneFill = new Fill( Color.White, Color.LightYellow, 45.0F );
                myPaneT.BaseDimension = 6.0F;

                // Make up some data arrays based on the Sine function
                double x, y;
                PointPairList list = new PointPairList();
                for ( int i=0; i<36; i++ )
                {
                    x = (double) i + 5;
                    y = 3.0 * ( 1.5 + Math.Sin( (double) i * 0.2 + (double) j ) );
                    list.Add( x, y );
                }

                LineItem myCurve = myPaneT.AddCurve( "Type " + j.ToString(),
                    list, rotator.NextColor, rotator.NextSymbol );
                myCurve.Symbol.Fill = new Fill( Color.White );

                master.Add( myPaneT );
            }

            myPane = master[0];

            Graphics g = this.CreateGraphics();

            //master.AutoPaneLayout( g, PaneLayout.ExplicitRow32 );
            //master.AutoPaneLayout( g, 2, 4 );
            master.AutoPaneLayout( g, false, new int[] { 1, 3, 2 }, new float[] { 2, 1, 3 } );
            master.AxisChange( g );

            g.Dispose();
            #endif

            #if false	// MasterPane - Single Pane
            master = new MasterPane( "ZedGraph MasterPane Single Pane Example", new Rectangle( 10, 10, 10, 10 ) );

            master.Fill = new Fill( Color.White, Color.MediumSlateBlue, 45.0F );

            // Create a new graph with topLeft at (40,40) and size 600x400
            GraphPane myPaneT = new GraphPane( new Rectangle( 40, 40, 600, 400 ),
                "Case 1",
                "Time, Days",
                "Rate, m/s" );

            myPaneT.Fill = new Fill( Color.White, Color.LightYellow, 45.0F );
            myPaneT.BaseDimension = 6.0F;

            // Make up some data arrays based on the Sine function
            double x, y;
            PointPairList list = new PointPairList();
            for ( int i=0; i<36; i++ )
            {
                x = (double) i + 5;
                y = 3.0 * ( 1.5 + Math.Sin( (double) i * 0.2 ) );
                list.Add( x, y );
            }

            LineItem myCurve = myPaneT.AddCurve( "Type 1",
                list, Color.Blue, SymbolType.Circle );
            myCurve.Symbol.Fill = new Fill( Color.White );
開發者ID:Jungwon,項目名稱:ZedGraph,代碼行數:67,代碼來源:Form1.cs


注:本文中的ZedGraph.MasterPane.AutoPaneLayout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。