Skip to content

Commit 6b245b6

Browse files
1 parent ef0383f commit 6b245b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

matplotlibcpp.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2255,9 +2255,9 @@ inline void subplot(long nrows, long ncols, long plot_number)
22552255

22562256
// construct positional args
22572257
PyObject* args = PyTuple_New(3);
2258-
PyTuple_SetItem(args, 0, PyFloat_FromDouble(nrows));
2259-
PyTuple_SetItem(args, 1, PyFloat_FromDouble(ncols));
2260-
PyTuple_SetItem(args, 2, PyFloat_FromDouble(plot_number));
2258+
PyTuple_SetItem(args, 0, PyLong_FromLong(nrows));
2259+
PyTuple_SetItem(args, 1, PyLong_FromLong(ncols));
2260+
PyTuple_SetItem(args, 2, PyLong_FromLong(plot_number));
22612261

22622262
PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_subplot, args);
22632263
if(!res) throw std::runtime_error("Call to subplot() failed.");

0 commit comments

Comments
 (0)