Skip to content

Commit aee1a52

Browse files
committed
subplot: float to int correction
1 parent d9afdb0 commit aee1a52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

matplotlibcpp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,9 +2296,9 @@ inline void subplot(long nrows, long ncols, long plot_number) {
22962296

22972297
// construct positional args
22982298
PyObject* args = PyTuple_New(3);
2299-
PyTuple_SetItem(args, 0, PyFloat_FromDouble(nrows));
2300-
PyTuple_SetItem(args, 1, PyFloat_FromDouble(ncols));
2301-
PyTuple_SetItem(args, 2, PyFloat_FromDouble(plot_number));
2299+
PyTuple_SetItem(args, 0, PyInt_FromLong(nrows));
2300+
PyTuple_SetItem(args, 1, PyInt_FromLong(ncols));
2301+
PyTuple_SetItem(args, 2, PyInt_FromLong(plot_number));
23022302

23032303
PyObject* res =
23042304
PyObject_CallObject(detail::_interpreter::get().s_python_function_subplot, args);

0 commit comments

Comments
 (0)