Skip to content

The color of the 3D arrow head does not match that of the arrow body #11759

Closed
@arthurzqhu

Description

@arthurzqhu

Bug report

Bug summary

The color of the 3D arrow head does not match that of the arrow body. (In fact, the two segments of head itself don't even match.)

Not sure if it is related to #11746, so I posted it separately just to make things clearer.

Code for reproduction

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

x = np.zeros(10)
y = np.zeros(10)
z = np.arange(10.)
dx = np.zeros(10)
dy = np.arange(10.)
dz = np.zeros(10)

ax = plt.figure().add_subplot(projection='3d')

arrow_color = plt.cm.Reds(dy/dy.max())

ax.quiver(x, y, z, dx, dy, dz, colors=arrow_color)
ax.set_ylim(0,10)
plt.show()

Actual outcome

test_arrow_head_color

Expected outcome

The entire arrow should have a single color.

Matplotlib version

  • Operating system: macOS 10.13.6
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: 2.7.15
  • Jupyter version (if applicable): 5.6.0
  • Other libraries:

matplotlib and Python were installed with Anaconda.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions