첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
------------------------------------------------------------------------------------------------------------------------------------------------------
728x90
728x170

TestProject.zip
0.01MB

▶ MainForm.cs

using System.Windows.Forms;

using ScottPlot;
using ScottPlot.Plottable;

namespace TestProject
{
    /// <summary>
    /// 메인 폼
    /// </summary>
    public partial class MainForm : Form
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - MainForm()

        /// <summary>
        /// 생성자
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            Plot plot = new Plot(800, 600);

            double[] homeWinArray = { 12, 17, 16, 18, 18 };
            double[] awayWinArray = { 11, 13, 16, 14, 14 };
            string[] labelArray   = { "2015/16", "2016/17", "2017/18", "2018/19", "2019/20" };

            ClevelandDotPlot clevelandDotPlot = plot.AddClevelandDot(homeWinArray, awayWinArray);

            clevelandDotPlot.SetPoint1Style(label : "홈 승리");
            clevelandDotPlot.SetPoint2Style(label : "원정 승리", markerShape : MarkerShape.triUp);

            plot.Title("영국 프리미어 리그 챔피언 홈 대 원정 승리");
            plot.XTicks(labelArray);
            plot.Legend();

            this.formsPlot.Reset(plot);

            this.formsPlot.Refresh();
        }

        #endregion
    }
}
728x90
그리드형(광고전용)
Posted by icodebroker
,