Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 446e02b

Browse filesBrowse files
committed
Fix bug in pcolormesh.
svn path=/branches/transforms/; revision=4565
1 parent e5408fb commit 446e02b
Copy full SHA for 446e02b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎src/_backend_agg.cpp

Copy file name to clipboardExpand all lines: src/_backend_agg.cpp
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ class QuadMeshGenerator {
11451145
inline unsigned vertex(unsigned idx, double* x, double* y) {
11461146
size_t m = (idx & 0x2) ? (m_m + 1) : m_m;
11471147
size_t n = (idx+1 & 0x2) ? (m_n + 1) : m_n;
1148-
double* pair = (double*)PyArray_GETPTR2(m_coordinates, m, n);
1148+
double* pair = (double*)PyArray_GETPTR2(m_coordinates, n, m);
11491149
*x = *pair++;
11501150
*y = *pair;
11511151
return (idx) ? agg::path_cmd_line_to : agg::path_cmd_move_to;
@@ -1172,7 +1172,7 @@ class QuadMeshGenerator {
11721172

11731173
inline QuadMeshGenerator(size_t meshWidth, size_t meshHeight, const Py::Object& coordinates) :
11741174
m_meshWidth(meshWidth), m_meshHeight(meshHeight), m_coordinates(NULL) {
1175-
PyArrayObject* coordinates_array = (PyArrayObject*)PyArray_FromObject(coordinates.ptr(), PyArray_DOUBLE, 1, 3);
1175+
PyArrayObject* coordinates_array = (PyArrayObject*)PyArray_FromObject(coordinates.ptr(), PyArray_DOUBLE, 3, 3);
11761176
if (!coordinates_array) {
11771177
throw Py::ValueError("Invalid coordinates array.");
11781178
}
@@ -1189,7 +1189,7 @@ class QuadMeshGenerator {
11891189
}
11901190

11911191
inline path_iterator operator()(size_t i) const {
1192-
return QuadMeshPathIterator(i % m_meshHeight, i / m_meshHeight, m_coordinates);
1192+
return QuadMeshPathIterator(i % m_meshWidth, i / m_meshWidth, m_coordinates);
11931193
}
11941194
};
11951195

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.