Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3746ccd

Browse files
committed
Update README (...). There's no other file for you to work at, hmm?
1 parent f470e65 commit 3746ccd

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,36 @@ A C++ wrapper of Qt Charts that looks, tastes and smells like [matplotlib](https
55

66
Madplotlib is a C++ header-only library that provides simple 2D plot capabilities, similar to [matplotlib](https://github.com/matplotlib/matplotlib) for Python. Madplotlib uses Qt Charts behind your back to render cool looking ~~cats~~ graphs that are easy to create with the help of [Eigen](eigen.tuxfamily.org).
77

8+
Here is what it looks like:
9+
10+
```cpp
11+
Eigen::ArrayXf a = Eigen::ArrayXf::LinSpaced(20, 0, 2000);
12+
Eigen::ArrayXf b = Eigen::ArrayXf::LinSpaced(20, 0, 100);
13+
Eigen::ArrayXf c = Eigen::ArrayXf::Zero(20);
14+
15+
b = b * b;
16+
c = 1000;
17+
18+
Madplotlib plt;
19+
plt.title("Test 5: Linear vs Exponential vs Flat");
20+
plt.ylabel("Y Values");
21+
plt.xlabel("X Values");
22+
23+
plt.plot(a, QString("label=Linear"));
24+
plt.plot(b, QString("label=Exponential"));
25+
plt.plot(c, QString("label=Flat"));
26+
plt.legend("loc=center right");
27+
plt.show();
28+
```
29+
830
Screenshots
931
-----------
1032
<img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test1.png" width="300" height="200"> <img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test2.png" width="300" height="200">
33+
1134
<img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test3.png" width="300" height="200"> <img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test4.png" width="300" height="200">
35+
1236
<img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test5.png" width="300" height="200"> <img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test7.png" width="300" height="200">
37+
1338
<img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test8.png" width="300" height="200"> <img src="https://github.com/madplotlib/madplotlib/blob/master/screenshots/test10.png" width="300" height="200">
1439

1540
Installation

0 commit comments

Comments
 (0)