Repository navigation
Expand file tree
/
Copy pathFigure.cs
More file actions
63 lines (53 loc) · 1.67 KB
/
Copy pathFigure.cs
File metadata and controls
63 lines (53 loc) · 1.67 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
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
namespace MatplotlibCS
{
/// <summary>
/// Class desribing a figure to be build
/// </summary>
[JsonObject(Title = "figure")]
public class Figure
{
#region ctor
/// <summary>
/// .ctor
/// </summary>
/// <param name="rows">Number of rows in subplots grid</param>
/// <param name="columns">Number of columns in subplots grid</param>
public Figure(int rows = 1, int columns = 1)
{
Rows = rows;
Columns = columns;
Subplots = new List<Axes>();
}
#endregion
#region Properties
/// <summary>
/// Number of rows in subplots grid
/// </summary>
[JsonProperty(PropertyName = "rows")]
public int Rows { get; set; } = 1;
/// <summary>
/// Number of columns in subplots grid
/// </summary>
[JsonProperty(PropertyName = "columns")]
public int Columns { get; set; } = 1;
/// <summary>
/// Figuree subplots
/// </summary>
[JsonProperty(PropertyName = "subplots")]
public List<Axes> Subplots { get; set; }
/// <summary>
/// Name or full path of the file where to save result
/// </summary>
[JsonProperty(PropertyName = "filename")]
public string FileName { get; set; }
/// <summary>
/// If true, matplotlib window won't be shown, only image will be saved to disk
/// </summary>
[JsonProperty(PropertyName = "onlySaveImage")]
public bool OnlySaveImage { get; set; }
#endregion
}
}