JuliaPlots/Plots.jl

PGFPlotsX cannot set ylims for certain plots

Open

#4.990 aberto em 24 de set. de 2024

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Julia (381 forks)batch import
PGFPlotsXgood first issue

Métricas do repositório

Stars
 (1.943 stars)
Métricas de merge de PR
 (Mesclagem média 13d 6h) (2 fundiu PRs em 30d)

Description

Details

I ran into this issue while creating a certain plot. pgfplotsx() backend successfully generates the initial plot, but when I try to adjust the y-axis, it gives me an error. This is an example that also shows the same error.

using Plots

pgfplotsx()
scatter(x-> 1e-3/(x-3), 1, 10000)
ylims!(-0.00025,0.00025)

gr()
scatter(x-> 1e-3/(x-3), 1, 10000)
ylims!(-0.00025,0.00025)

the gr() backend can change the y axis but pgfplotsx() does not.

I faced no issue setting the ylims while using purely PGFPlotsX,

using PGFPlotsX

x = range(1, 10000, length = 500) 
@pgf Axis({ymin= -0.00025, ymax = 0.00025 },
    Plot( { only_marks,},
        Coordinates(x, @. (1e-3) / (x-3))
    )
)

Backends

Backend yes no untested
gr (default) x
pythonplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

Plots v1.40.8 PGFPlotsX v1.6.1 Output of versioninfo():

Julia Version 1.10.0
Commit 3120989f39 (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =

Guia do colaborador