Beispiel #1
0
        /// <summary>
        /// サイズを設定する.
        /// </summary>
        public static void SetSize(this Wgnuplot plot, Size value)
        {
            String command = "";

            switch (value.Type)
            {
            case SizeType.Square:

                command = "set size square";
                break;

            case SizeType.RatioAxis:
                command = "set size ratio " + value.RatioValue;
                break;

            case SizeType.RatioUnit:
                command = "set size ratio -" + value.RatioValue;
                break;
            }
            plot.Send(command);
        }
Beispiel #2
0
 static void Run()
 {
     Type tester = typeof(Tester);
     MethodInfo[] methods = tester.GetMethods(BindingFlags.Static | BindingFlags.NonPublic);
     foreach (MethodInfo method in methods)
     {
         if (!method.Name.StartsWith("Test"))
         {
             continue;
         }
         using (Wgnuplot plot = new Wgnuplot(@".\gnuplot\bin\pgnuplot.exe"))
         {
             System.Console.WriteLine("Method.Name = " + method.Name);
             System.Console.Write("exit? [y/n]: ");
             method.Invoke(null, new object[] { plot });
             ConsoleKeyInfo key = System.Console.ReadKey();
             System.Console.WriteLine();
             if (key.Key == ConsoleKey.Y)
             {
                 break;
             }
         }
     }
 }
Beispiel #3
0
 /// <summary>
 /// x2 軸の目盛を設定する.
 /// </summary>
 public static void SetX2Tics(this Wgnuplot plot, Tics value)
 {
     plot.Send(value != null ? "set x2tics " + value : "unset x2tics");
 }
Beispiel #4
0
 public static void Test(this Wgnuplot plot)
 {
     Console.WriteLine("test");
 }
Beispiel #5
0
        /// <summary>
        /// y2 軸の範囲を設定する.
        /// </summary>
        public static void SetY2Range(this Wgnuplot plot, Range value)
        {
            String command = String.Format("set y2range [{0}:{1}]", value.From, value.To);

            plot.Send(command);
        }
Beispiel #6
0
 /// <summary>
 /// y 軸のラベルを設定する.
 /// </summary>
 public static void SetYLabel(this Wgnuplot plot, Label value)
 {
     plot.Send(value != null ? "set ylabel " + value : "unset ylabel");
 }
Beispiel #7
0
 public static void UnsetSize(this Wgnuplot plot)
 {
     plot.Send("unset size");
 }
Beispiel #8
0
 public static void UnsetArrow(this Wgnuplot plot)
 {
 }
Beispiel #9
0
 /// <summary>
 /// 枠線を設定する.
 /// </summary>
 public static void SetBorder(this Wgnuplot plot, Border value)
 {
     plot.Send("set border " + (int)value);
 }
Beispiel #10
0
 /// <summary>
 /// y 軸を log スケールに設定する.
 /// <remarks>
 /// <c>true</c> の場合は log スケールに,<c>false</c> の場合は log スケール設定を解除する.
 /// </remarks>
 /// </summary>
 public static void SetLogScaleY(this Wgnuplot plot, bool value)
 {
     plot.Send((value ? "" : "un") + "set logscale y");
 }
Beispiel #11
0
 /// <summary>
 /// y 軸目盛の分割数を設定する.
 /// <para>例えば 2 を設定した場合,目盛が 2 分割されるため,目盛の間に補助目盛が 1 つ表示される.</para>
 /// </summary>
 public static void SetMYTics(this Wgnuplot plot, int value)
 {
     plot.Send("set mytics " + value);
 }
Beispiel #12
0
 public static void SetArrow(this Wgnuplot plot, Arrow arrow)
 {
 }
Beispiel #13
0
 /// <summary>
 /// y 軸のミラー設定を行う.
 /// <para><c>false</c> を設定すると,左右軸の目盛が一致しなくなる.</para>
 /// </summary>
 public static void SetYTicsMirror(this Wgnuplot plot, bool value)
 {
     plot.Send("set ytics " + (value ? "" : "no") + "mirror");
 }
Beispiel #14
0
 static void Test01(Wgnuplot plot)
 {
     plot.Send("splot x**2 + y**2");
 }