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

Skip to content

Commit a7c38ad

Browse files
Gjacquenotlava
authored andcommitted
📝 Typo update in Readme.md
1 parent fa673c6 commit a7c38ad

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A more comprehensive example:
3030
3131
namespace plt = matplotlibcpp;
3232
33-
int main()
33+
int main()
3434
{
3535
// Prepare data.
3636
int n = 5000;
@@ -73,26 +73,26 @@ Alternatively, matplotlib-cpp also supports some C++11-powered syntactic sugar:
7373
using namespace std;
7474
namespace plt = matplotlibcpp;
7575

76-
int main()
77-
{
76+
int main()
77+
{
7878
// Prepare data.
7979
int n = 5000; // number of data points
80-
vector<double> x(n),y(n);
80+
vector<double> x(n),y(n);
8181
for(int i=0; i<n; ++i) {
8282
double t = 2*M_PI*i/n;
8383
x.at(i) = 16*sin(t)*sin(t)*sin(t);
8484
y.at(i) = 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t);
8585
}
8686

87-
// plot() takes an arbitrary number of (x,y,format)-triples.
87+
// plot() takes an arbitrary number of (x,y,format)-triples.
8888
// x must be iterable (that is, anything providing begin(x) and end(x)),
89-
// y must either be callable (providing operator() const) or iterable.
89+
// y must either be callable (providing operator() const) or iterable.
9090
plt::plot(x, y, "r-", x, [](double d) { return 12.5+abs(sin(d)); }, "k-");
9191

9292

9393
// show plots
9494
plt::show();
95-
}
95+
}
9696
```
9797
g++ modern.cpp -std=c++11 -I/usr/include/python2.7 -lpython
9898
@@ -256,10 +256,10 @@ The same technique can be used for linking against a custom build of python
256256

257257
Why?
258258
----
259-
I initially started this library during my diploma thesis. The usual approach of
259+
I initially started this library during my diploma thesis. The usual approach of
260260
writing data from the c++ algorithm to a file and afterwards parsing and plotting
261261
it in python using matplotlib proved insufficient: Keeping the algorithm
262-
and plotting code in sync requires a lot of effort when the C++ code frequently and substantially
262+
and plotting code in sync requires a lot of effort when the C++ code frequently and substantially
263263
changes. Additionally, the python yaml parser was not able to cope with files that
264264
exceed a few hundred megabytes in size.
265265

@@ -290,4 +290,4 @@ Todo/Issues/Wishlist
290290
in "".'
291291

292292
* MacOS: `Unable to import matplotlib.pyplot`. Cause: In mac os image rendering back end of matplotlib (what-is-a-backend to render using the API of Cocoa by default). There is Qt4Agg and GTKAgg and as a back-end is not the default. Set the back end of macosx that is differ compare with other windows or linux os.
293-
Solution is discribed [here](https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python?noredirect=1&lq=1), additional information can be found there too(see links in answers).
293+
Solution is described [here](https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python?noredirect=1&lq=1), additional information can be found there too(see links in answers).

0 commit comments

Comments
 (0)