Repository navigation
Expand file tree
/
Copy pathLine2D.cs
More file actions
82 lines (69 loc) · 2.22 KB
/
Copy pathLine2D.cs
File metadata and controls
82 lines (69 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System.Collections.Generic;
using Newtonsoft.Json;
namespace MatplotlibCS
{
/// <summary>
/// Описание линии графика
/// </summary>
[JsonObject(Title = "line")]
public class Line2D : PlotItem
{
#region ctor
/// <summary>
/// Конструктор
/// </summary>
/// <param name="name">Название линии</param>
///
public Line2D(string name)
{
Name = name;
X = new List<double>();
Y = new List<double>();
}
#endregion
#region Properties
/// <summary>
/// Название линии
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Название цвета
/// </summary>
[JsonProperty(PropertyName = "color")]
public string Color { get; set; } = "b";
/// <summary>
/// Маркер точки
/// [ '+' | ',' | '.' | '1' | '2' | '3' | '4' ]
/// </summary>
[JsonProperty(PropertyName = "marker")]
public string Marker { get; set; } = "";
/// <summary>
/// Размер маркера
/// </summary>
[JsonProperty(PropertyName = "markerSize")]
public float MarkerSize { get; set; } = 1;
/// <summary>
/// Толщина линии
/// </summary>
[JsonProperty(PropertyName = "lineWidth")]
public float LineWidth { get; set; } = 1;
/// <summary>
/// Маркер точки
/// [ '-' | '--' | '-.' | ':' | 'steps' | ...]
/// </summary>
[JsonProperty(PropertyName = "lineStyle")]
public string LineStyle { get; set; } = "-";
/// <summary>
/// Данные для графика, аргумент
/// </summary>
[JsonProperty(PropertyName = "x")]
public List<double> X { get; set; }
/// <summary>
/// Данные для графика, значение
/// </summary>
[JsonProperty(PropertyName = "y")]
public List<double> Y { get; set; }
#endregion
}
}