8000 exception after clicking ok when editing axis curve info on 3d plot · Issue #10496 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
exception after clicking ok when editing axis curve info on 3d plot #10496
Closed
@tlatorre-uchicago

Description

@tlatorre-uchicago

Bug report

Bug summary

When plotting a 3d wireframe and opening the "Edit axis, curve and image properties" window, matplotlib will throw a ValueError exception after clicking "OK".

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from scipy.stats import norm

x = np.linspace(0,1,1000)
y = np.linspace(0,1,1000)
xx, yy = np.meshgrid(x,y)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_wireframe(xx,yy,norm.pdf(xx,0.5)*norm.pdf(yy,0.5))
plt.show()

Then click the "Edit axis, curve and image properties" button and then click "OK".

Actual outcome

When clicking "OK" I get the following exception:

$ python test.py 
Traceback (most recent call last):
  File "/home/tlatorre/.conda/envs/noisyopt/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 681, in edit_parameters
    figureoptions.figure_edit(axes, self)
  File "/home/tlatorre/.conda/envs/noisyopt/lib/python2.7/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 262, in figure_edit
    apply_callback(data)
  File "/home/tlatorre/.conda/envs/noisyopt/lib/python2.7/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 255, in apply_callback
    if not (axes.get_xlim() == orig_xlim and axes.get_ylim() == orig_ylim):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Aborted

Matplotlib version

  • Operating system: Scientific Linux 6
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 2.7.14

Matplotlib was installed using the anaconda installer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: QtRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0