-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started working updating vsl.plot (#181)
* Started working updating vsl.plot * Fixed some issues and updated examples
- Loading branch information
1 parent
0bedacc
commit 1ee1419
Showing
10 changed files
with
200 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module main | ||
|
||
import vsl.plot | ||
import vsl.util | ||
|
||
fn main() { | ||
y := [ | ||
0.0, | ||
1, | ||
3, | ||
1, | ||
0, | ||
-1, | ||
-3, | ||
-1, | ||
0, | ||
1, | ||
3, | ||
1, | ||
0, | ||
] | ||
x := util.arange(y.len) | ||
mut plt := plot.Plot.new() | ||
plt.scatter( | ||
x: x | ||
y: y | ||
mode: 'lines+markers' | ||
marker: plot.Marker{ | ||
size: []f64{len: x.len, init: 10.0} | ||
color: []string{len: x.len, init: '#FF0000'} | ||
} | ||
line: plot.Line{ | ||
color: '#FF0000' | ||
} | ||
) | ||
plt.layout( | ||
title: 'Scatter plot example' | ||
annotations: [plot.Annotation{ | ||
text: 'test annotation' | ||
}] | ||
) | ||
plt.show()! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.