Plots.jl: twinx() not working with PGFPlots

Created on 24 Jun 2019  路  4Comments  路  Source: JuliaPlots/Plots.jl

Hello,
It seems to me that PGFPlots gives an incorrect output when trying to share the same x axis between two plots with twinx(). Here is the sample code

using Plots
pgfplots()
plot(1:10); plot!(twinx(), -(1:10))

Here is the output of PGFPlots:
pgfplots
Here is the generated .tex: pgfplot.txt
For reference, here is the correct output from GR:
gr

PGFPlotsX bug

Most helpful comment

That's messed up. Thanks for reporting!

All 4 comments

That's messed up. Thanks for reporting!

I have experienced the same problem today. twinx() works fine for pyplot() and gr() backends, but will black-out the entire background under pgfplots.

This does not become black, but still is messed up in the pgfplotsx-backend

Any workarounds for this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asinghvi17 picture asinghvi17  路  3Comments

GravityAssisted picture GravityAssisted  路  5Comments

lstagner picture lstagner  路  5Comments

jebej picture jebej  路  4Comments

nebuta picture nebuta  路  3Comments