-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected outcome with matplotlib.pyplot.pcolor() #12373
Comments
This might be a bug in matplotlib2tikz. In the code you provided, I can
only presume that rendering is somehow performed by tikz_save(). If that
function is merely iterating through the artist tree and saving out the
results without resolving colors and other features, which normally happens
during draw-time, then it wouldn't get these things right.
This package doesn't seem to follow the proper methods for adding new
export formats (admittedly, matplotlib hasn't really made that friendly to
external packages, either), but that is really the only way to do it
properly.
…On Tue, Oct 2, 2018 at 1:58 PM strpeter ***@***.***> wrote:
Bug report
*The entire 3d plot after latex compilation has the same color, i.e. a bug
similar to #7243 <#7243>
also applies also to the command matplotlib.pyplot.pcolor().*
*Code for reproduction*
import numpy as npimport matplotlib.pyplot as pltfrom matplotlib2tikz import save as tikz_save
pa = np.linspace(.1, 1, num=11)
pb = np.linspace(.1, 1, num=11)
pa, pb = np.meshgrid(pa, pb)
q = 1/(pa+pb)
plt.pcolor(pa, pb, q)
plt.colorbar()
tikz_save('test_tikz.tikz')
*Actual outcome*
The pdf generated with latex containing the 3d plot is supposed to be of
variable color but the entire 3d plot has the same color.
Versions
Operating System: Linux 4.18.9-arch1-1-ARCH
Python = 3.7.0 (installed from pacman)
numpy = 1.15.2
matplotlib = 2.2.3
matplotlib2tikz = 0.6.18
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12373>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AARy-EV9u3tNZ0v-yLJX4LjOKoshK_zMks5ug6lBgaJpZM4XEj8x>
.
|
This seems like a bug to report to matplotlibtikz. But feel free to comment here if there is something for us to do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
The entire 3d plot after latex compilation has the same color, i.e. a bug similar to #7243 also applies also to the command
matplotlib.pyplot.pcolor()
.Code for reproduction
Actual outcome
The pdf generated with latex containing the 3d plot is supposed to be of variable color but the entire 3d plot has the same color.
Versions
The text was updated successfully, but these errors were encountered: