[arrayfire] 27/284: update plot2d example to include scatter plot
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 0a78b60dd57056353b3265a56428577db52f98a5
Author: syurkevi <stefan at arrayfire.com>
Date: Fri Nov 20 13:15:06 2015 -0500
update plot2d example to include scatter plot
---
examples/graphics/plot2d.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/examples/graphics/plot2d.cpp b/examples/graphics/plot2d.cpp
index 7e28d34..c6d3452 100644
--- a/examples/graphics/plot2d.cpp
+++ b/examples/graphics/plot2d.cpp
@@ -21,17 +21,21 @@ int main(int argc, char *argv[])
try {
// Initialize the kernel array just once
af::info();
- af::Window myWindow(512, 512, "2D Plot example: ArrayFire");
+ af::Window myWindow(1024, 512, "2D Plot example: ArrayFire");
array Y;
int sign = 1;
array X = seq(-af::Pi, af::Pi, PRECISION);
+ myWindow.grid(1, 2);
for (double val=-af::Pi; !myWindow.close(); ) {
Y = sin(X);
- myWindow.plot(X, Y);
+ myWindow(0,0).plot(X, Y);
+ myWindow(0,1).scatter(X, Y, AF_MARKER_POINT);
+
+ myWindow.show();
X = X + PRECISION * float(sign);
val += PRECISION * float(sign);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list