| 1 | { |
| 2 | "task_id": "matplotlib__matplotlib-23562", |
| 3 | "setup_info": { |
| 4 | "repo_path": "/home/haifeng/projects/reverse-prompt/SWE-bench/testbed/matplotlib__matplotlib/setup_matplotlib__matplotlib__3.5", |
| 5 | "env_name": "setup_matplotlib__matplotlib__3.5", |
| 6 | "pre_install": [], |
| 7 | "install": "python -m pip install -e .", |
| 8 | "test_cmd": "pytest --no-header -rA --tb=no -p no:cacheprovider lib/mpl_toolkits/tests/test_mplot3d.py" |
| 9 | }, |
| 10 | "task_info": { |
| 11 | "instance_id": "matplotlib__matplotlib-23562", |
| 12 | "base_commit": "29a86636a9c45ab5ac4d80ac76eaee497f460dce", |
| 13 | "hints_text": "Ok, I have a \"fix\", in the sense that that attribute will be defined upon initialization. However, for your example, the facecolors returned is completely useless ([[0, 0, 1, 1]] -- all blue, which is default). I suspect that there is a deeper problem with ScalarMappables in general in that they don't set their facecolors until draw time?\n\nThe solution is to probably force the evaluation of the norm + cmap in `get_facecolors`.\n\nThe bigger question I have is if regular PolyCollections that are\nScalarMappables suffer from the same problem?\n\nOn Sat, Feb 7, 2015 at 6:42 PM, Thomas A Caswell notifications@github.com\nwrote:\n\n> The solution is to probably force the evaluation of the norm + cmap in\n> get_facecolors.\n> \n> \u2014\n> Reply to this email directly or view it on GitHub\n> https://github.com/matplotlib/matplotlib/issues/4067#issuecomment-73389124\n> .\n\nPR #4090 addresses this. Although, it still doesn't return any useful\nvalue... it just does the same thing that regular PolyCollections do.\n\nOn Mon, Feb 9, 2015 at 3:47 PM, Thomas A Caswell notifications@github.com\nwrote:\n\n> Assigned #4067 https://github.com/matplotlib/matplotlib/issues/4067 to\n> @WeatherGod https://github.com/WeatherGod.\n> \n> \u2014\n> Reply to this email directly or view it on GitHub\n> https://github.com/matplotlib/matplotlib/issues/4067#event-232758504.\n\nI believe I'm still running into this issue today. Below is the error message I receive when attempting to convert hb_made (a hexbin PolyCollection) into a Poly3DCollection. Are there any other ways to convert 2D PolyCollections into 3D PolyCollections?\n\n```\nax.add_collection3d(hb_made, zs=shotNumber.get_array(), zdir='y')\n```\n\n File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py\", line 2201, in add_collection3d\n art3d.poly_collection_2d_to_3d(col, zs=zs, zdir=zdir)\n File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.py\", line 716, in poly_collection_2d_to_3d\n col.set_3d_properties()\n File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.py\", line 595, in set_3d_properties\n self._edgecolors3d = PolyCollection.get_edgecolors(self)\n File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/collections.py\", line 626, in get_edgecolor\n return self.get_facecolors()\n File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.py\", line 699, in get_facecolors\n return self._facecolors2d\nAttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'\n\nI don't know if this is the appropriate place to post this, but here is a temporary fix for anyone who is waiting on the permanent fix.\r\n\r\nI encounter this same error when trying to add a legend to my 3D surface plot.\r\n\r\n```\r\nsurf = axarr[0].plot_surface(XSrc, YAmb, XCorrMeanDepthErrs[CodingScheme], label=CodingScheme, \r\n\t\t\t\t\t\talpha=.5, facecolor=color, edgecolor='black', linewidth=2)\r\naxarr[0].legend()\r\n```\r\n\r\nWhile a permanent fix is find, I found that a simple temporary fix is to explicitly set the `_facecolors2d` and `_edgecolors2d` parameters after creating the surface plot.\r\n\r\n```\r\nsurf = axarr[0].plot_surface(XSrc, YAmb, XCorrMeanDepthErrs[CodingScheme], label=CodingScheme, \r\n\t\t\t\t\t\talpha=.5, facecolor=color, edgecolor='black', linewidth=2)\r\nsurf._facecolors2d=surf._facecolors3d\r\nsurf._edgecolors2d=surf._edgecolors3d\r\naxarr[0].legend()\r\n```\r\n\nI also could not get the legend to show in my 3d plot of planes with the error:\"AttributeError: 'Poly3DCollection' object has no attribute '_edgecolors2d'\". \r\n\r\nAlthough the fix from @felipegb94 worked: \r\nsurf._facecolors2d=surf._facecolors3d\r\nsurf._edgecolors2d=surf._edgecolors3d\r\n\r\n\nI'm remilestoning this to keep it on the radar. \nI run into this today, but now even the workaround (https://github.com/matplotlib/matplotlib/issues/4067#issuecomment-357794003) is not working any more.\nI ran into this today, with version 3.3.1.post1012+g5584ba764, the workaround did the trick.\nI ran in to this as well, and the fix works in version 3.3.1 but not in 3.3.3\n@bootje2000 Apparently some attributes have been renamed or moved around (prima facie). Try this slight modification to @felipegb94's workaround:\r\n```\r\nsurf._facecolors2d = surf._facecolor3d\r\nsurf._edgecolors2d = surf._edgecolor3d\r\n```\r\nNote the lack of \"s\" on the RHS. `_facecolors3d` and `_edgecolors3d` do not seem to exist anymore.\r\n\r\nThis works in `matplotlib 3.3.3` as of January 04, 2021.\nNone of the workarounds work in matplotlib 3.5.1\r\nIt works after modifying for the available attributes `_facecolors `and `_edgecolors`:\r\n`surf._facecolors2d = surf._facecolors`\r\n`surf._edgecolors2d = surf._edgecolors`\r\n\r\nHint: if there are multiple surfaces on the same axes, the workaround must be applied to each surface individually.\n@nina-wwc I just checked the minimal working example in this thread using `matplotlib-3.5.1` and `3.5.2` (latest) and my workaround works as it did before, as does yours. Could you test the example code in a virtual environment perhaps, if you haven't already done so?\nThe problem still is that we update some state during the draw process. Internally we do the updating and the access in just the right order so that in most cases we do not notice that we also add the attributes on the fly. \r\n\r\nThe best workaround for the current case (assuming 3.5):\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.tri as mtri\r\nimport matplotlib.pyplot as plt\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\n\r\ny,x = np.ogrid[1:10:100j, 1:10:100j]\r\nz2 = np.cos(x)**3 - np.sin(y)**2\r\nfig = plt.figure()\r\nax = fig.add_subplot(111, projection='3d')\r\nr = ax.plot_surface(x,y,z2, cmap='hot')\r\nfig.draw_without_rendering() # <--- This is the key line\r\nr.get_facecolors()\r\n```\r\n\r\nHowever, I still think the best solution is https://github.com/matplotlib/matplotlib/issues/4067#issuecomment-73389124 which will require looking in `get_facecolors` to detect when these attributes are missing (and if stale?) and then force what ever needs to be done to update them.\r\n\r\nLabeling this as a good first issue because it clearly has affected a lot of people for a long time, there is a very clear reproduction example (that will make a perfect test), and there are no API design choices to be made, but medium difficulty because it will require understanding some slightly tricking inheritance and how our 3D artists draw them selves. ", |
| 14 | "created_at": "2022-08-05T13:44:06Z", |
| 15 | "test_patch": "diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py\n--- a/lib/mpl_toolkits/tests/test_mplot3d.py\n+++ b/lib/mpl_toolkits/tests/test_mplot3d.py\n@@ -1812,6 +1812,28 @@ def test_scatter_spiral():\n fig.canvas.draw()\n \n \n+def test_Poly3DCollection_get_facecolor():\n+ # Smoke test to see that get_facecolor does not raise\n+ # See GH#4067\n+ y, x = np.ogrid[1:10:100j, 1:10:100j]\n+ z2 = np.cos(x) ** 3 - np.sin(y) ** 2\n+ fig = plt.figure()\n+ ax = fig.add_subplot(111, projection='3d')\n+ r = ax.plot_surface(x, y, z2, cmap='hot')\n+ r.get_facecolor()\n+\n+\n+def test_Poly3DCollection_get_edgecolor():\n+ # Smoke test to see that get_edgecolor does not raise\n+ # See GH#4067\n+ y, x = np.ogrid[1:10:100j, 1:10:100j]\n+ z2 = np.cos(x) ** 3 - np.sin(y) ** 2\n+ fig = plt.figure()\n+ ax = fig.add_subplot(111, projection='3d')\n+ r = ax.plot_surface(x, y, z2, cmap='hot')\n+ r.get_edgecolor()\n+\n+\n @pytest.mark.parametrize(\n \"vertical_axis, proj_expected, axis_lines_expected, tickdirs_expected\",\n [\n", |
| 16 | "repo": "matplotlib/matplotlib", |
| 17 | "problem_statement": "'Poly3DCollection' object has no attribute '_facecolors2d'\nThe following minimal example demonstrates the issue:\n\n```\nimport numpy as np\nimport matplotlib.tri as mtri\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\ny,x = np.ogrid[1:10:100j, 1:10:100j]\nz2 = np.cos(x)**3 - np.sin(y)**2\nfig = plt.figure()\nax = fig.add_subplot(111, projection='3d')\nr = ax.plot_surface(x,y,z2, cmap='hot')\nr.get_facecolors()\n```\n\nIt fails on the last line with the following traceback:\n\n```\nAttributeError Traceback (most recent call last)\n<ipython-input-13-de0f41d662cd> in <module>()\n----> 1 r.get_facecolors()\n\n/home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc in get_facecolors(self)\n 634\n 635 def get_facecolors(self):\n--> 636 return self._facecolors2d\n 637 get_facecolor = get_facecolors\n 638\n\nAttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'\n```\n\nTested with mpl versions 1.3.1 and 1.4.2.\n\nSent here by Benjamin, from the mpl users mailing list (mail with the same title). Sorry for dumping this without more assistance, I'm not yet at a python level where I can help in debugging, I think (well, it seems daunting).\n\n", |
| 18 | "version": "3.5", |
| 19 | "FAIL_TO_PASS": [ |
| 20 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_Poly3DCollection_get_edgecolor", |
| 21 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_Poly3DCollection_get_facecolor" |
| 22 | ], |
| 23 | "PASS_TO_PASS": [ |
| 24 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_alpha[png]", |
| 25 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_calling_conventions", |
| 26 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_edge_style[png]", |
| 27 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_named_colors[png]", |
| 28 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_rgb_data[png]", |
| 29 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_simple[png]", |
| 30 | "lib/mpl_toolkits/tests/test_mplot3d.py::TestVoxels::test_xyz[png]", |
| 31 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_add_collection3d_zs_array[png]", |
| 32 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_add_collection3d_zs_scalar[png]", |
| 33 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_aspects[png]", |
| 34 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_autoscale", |
| 35 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_ax3d_tickcolour", |
| 36 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_cla[png]", |
| 37 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_focal_length[png]", |
| 38 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_focal_length_checks", |
| 39 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_isometric[png]", |
| 40 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_labelpad[png]", |
| 41 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_ortho[png]", |
| 42 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_repr", |
| 43 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_axes3d_rotated[png]", |
| 44 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d[png]", |
| 45 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d_colors", |
| 46 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d_lightsource", |
| 47 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d_notshaded[png]", |
| 48 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d_shaded[png]", |
| 49 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_colorbar_pos", |
| 50 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_computed_zorder[png]", |
| 51 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contour3d[png]", |
| 52 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contour3d_1d_input", |
| 53 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contour3d_extend3d[png]", |
| 54 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contourf3d[png]", |
| 55 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contourf3d_extend[png-both-levels0]", |
| 56 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contourf3d_extend[png-max-levels2]", |
| 57 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contourf3d_extend[png-min-levels1]", |
| 58 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_contourf3d_fill[png]", |
| 59 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_equal_box_aspect[png]", |
| 60 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_errorbar3d[png]", |
| 61 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_errorbar3d_errorevery[png]", |
| 62 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_format_coord", |
| 63 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_get_axis_position", |
| 64 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_xlim3d-left-inf]", |
| 65 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_xlim3d-left-nan]", |
| 66 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_xlim3d-right-inf]", |
| 67 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_xlim3d-right-nan]", |
| 68 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_ylim3d-bottom-inf]", |
| 69 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_ylim3d-bottom-nan]", |
| 70 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_ylim3d-top-inf]", |
| 71 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_ylim3d-top-nan]", |
| 72 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_zlim3d-bottom-inf]", |
| 73 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_zlim3d-bottom-nan]", |
| 74 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_zlim3d-top-inf]", |
| 75 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invalid_axes_limits[set_zlim3d-top-nan]", |
| 76 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_inverted[png]", |
| 77 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_inverted_cla", |
| 78 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_invisible_axes[png]", |
| 79 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_line3d_set_get_data_3d", |
| 80 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_lines3d[png]", |
| 81 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_lines_dists[png]", |
| 82 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_lines_dists_nowarning", |
| 83 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins", |
| 84 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[TypeError-args6-kwargs6-Cannot", |
| 85 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[TypeError-args7-kwargs7-Cannot", |
| 86 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[TypeError-args8-kwargs8-Cannot", |
| 87 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[TypeError-args9-kwargs9-Must", |
| 88 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[ValueError-args0-kwargs0-margin", |
| 89 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[ValueError-args1-kwargs1-margin", |
| 90 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[ValueError-args2-kwargs2-margin", |
| 91 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[ValueError-args3-kwargs3-margin", |
| 92 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[ValueError-args4-kwargs4-margin", |
| 93 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_margins_errors[ValueError-args5-kwargs5-margin", |
| 94 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_marker_draw_order_data_reversed[png--50]", |
| 95 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_marker_draw_order_data_reversed[png-130]", |
| 96 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_marker_draw_order_view_rotated[png]", |
| 97 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_minor_ticks[png]", |
| 98 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_mixedsamplesraises", |
| 99 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_mixedsubplots[png]", |
| 100 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_pan", |
| 101 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_patch_collection_modification[png]", |
| 102 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_patch_modification", |
| 103 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_pathpatch_3d[png]", |
| 104 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_plot_3d_from_2d[png]", |
| 105 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_plot_scalar[png]", |
| 106 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_plotsurface_1d_raises", |
| 107 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_poly3dcollection_alpha[png]", |
| 108 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_poly3dcollection_closed[png]", |
| 109 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_poly3dcollection_verts_validation", |
| 110 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_poly_collection_2d_to_3d_empty", |
| 111 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_proj_axes_cube[png]", |
| 112 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_proj_axes_cube_ortho[png]", |
| 113 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_proj_transform", |
| 114 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_quiver3D_smoke[png]", |
| 115 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_quiver3d[png]", |
| 116 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_quiver3d_empty[png]", |
| 117 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_quiver3d_masked[png]", |
| 118 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_rot", |
| 119 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scalarmap_update[png]", |
| 120 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d[png]", |
| 121 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d_color[png]", |
| 122 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d_linewidth[png]", |
| 123 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d_linewidth_modification[png]", |
| 124 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d_modification[png]", |
| 125 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d_sorting[png-False]", |
| 126 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter3d_sorting[png-True]", |
| 127 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_scatter_spiral[png]", |
| 128 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_shared_axes_retick", |
| 129 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_stem3d[png]", |
| 130 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_subfigure_simple", |
| 131 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_surface3d[png]", |
| 132 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_surface3d_masked[png]", |
| 133 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_surface3d_masked_strides[png]", |
| 134 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_surface3d_shaded[png]", |
| 135 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_text3d[png]", |
| 136 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_text3d_modification[png]", |
| 137 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_text_3d[png]", |
| 138 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_ticklabel_format[png]", |
| 139 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_tight_layout_text[png]", |
| 140 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_tricontour[png]", |
| 141 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_trisurf3d[png]", |
| 142 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_trisurf3d_shaded[png]", |
| 143 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[False-x]", |
| 144 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[False-y]", |
| 145 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[False-z]", |
| 146 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[None-x]", |
| 147 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[None-y]", |
| 148 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[None-z]", |
| 149 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[True-x]", |
| 150 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[True-y]", |
| 151 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_unautoscale[True-z]", |
| 152 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_view_init_vertical_axis[x-proj_expected2-axis_lines_expected2-tickdirs_expected2]", |
| 153 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_view_init_vertical_axis[y-proj_expected1-axis_lines_expected1-tickdirs_expected1]", |
| 154 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_view_init_vertical_axis[z-proj_expected0-axis_lines_expected0-tickdirs_expected0]", |
| 155 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_wireframe3d[png]", |
| 156 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_wireframe3dzerocstride[png]", |
| 157 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_wireframe3dzerorstride[png]", |
| 158 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_wireframe3dzerostrideraises", |
| 159 | "lib/mpl_toolkits/tests/test_mplot3d.py::test_world" |
| 160 | ], |
| 161 | "environment_setup_commit": "de98877e3dc45de8dd441d008f23d88738dc015d", |
| 162 | "patch": "diff --git a/lib/mpl_toolkits/mplot3d/art3d.py b/lib/mpl_toolkits/mplot3d/art3d.py\n--- a/lib/mpl_toolkits/mplot3d/art3d.py\n+++ b/lib/mpl_toolkits/mplot3d/art3d.py\n@@ -867,9 +867,19 @@ def set_alpha(self, alpha):\n self.stale = True\n \n def get_facecolor(self):\n+ # docstring inherited\n+ # self._facecolors2d is not initialized until do_3d_projection\n+ if not hasattr(self, '_facecolors2d'):\n+ self.axes.M = self.axes.get_proj()\n+ self.do_3d_projection()\n return self._facecolors2d\n \n def get_edgecolor(self):\n+ # docstring inherited\n+ # self._edgecolors2d is not initialized until do_3d_projection\n+ if not hasattr(self, '_edgecolors2d'):\n+ self.axes.M = self.axes.get_proj()\n+ self.do_3d_projection()\n return self._edgecolors2d\n \n \n", |
| 163 | "pr_link": "https://github.com/matplotlib/matplotlib/pull/23562" |
| 164 | } |
| 165 | } |