8000 Subplot by torfinnberset · Pull Request #10 · lava/matplotlib-cpp · GitHub
[go: up one dir, main page]

Skip to content

Subplot #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2016
Merged

Subplot #10

merged 2 commits into from
Sep 22, 2016

Conversation

torfinnberset
Copy link

Add subplot function

Fix typos, whitespace, and reorder functions
Add subplot functions
@@ -266,7 +265,20 @@ namespace matplotlibcpp {
Py_DECREF(res);
}


inline void subplot(long nrows, long ncols, long plot_number) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks! But I think this function could be improved if

  • there was a check that args is not nullptr after calling PyTuple_New()
  • Py_DECREF(args) would be called before throwing the exception to avoid a memory leak

@lava lava merged commit 741350f into lava:master Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0