Skip to content
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

Ticks and axes are not always shown #510

Open
PavelBal opened this issue Mar 12, 2024 · 1 comment
Open

Ticks and axes are not always shown #510

PavelBal opened this issue Mar 12, 2024 · 1 comment
Assignees

Comments

@PavelBal
Copy link
Member

E.g. this snapshot lost its axes:

https://github.com/Open-Systems-Pharmacology/OSPSuite-R/blob/develop/tests/testthat/_snaps/plot-observed-vs-simulated/lloq-vertical.svg

It was in this PR: Open-Systems-Pharmacology/OSPSuite-R#1368

@pchelle
Copy link
Collaborator

pchelle commented Mar 12, 2024

I think the issue comes from the {ggplot2} update to version 3.5
The axis seems not displayed if there is no tick in the plot

Caution

the displayed ticks in the example come from ggplot2::annotation_logticks and not the ggplot2::scale_x_log10

library(tlf)

logConfigNoTick <- ObsVsPredPlotConfiguration$new(
  xScale = Scaling$log, 
  yScale = Scaling$log
  )
logPlotNoTick <- plotObsVsPred(
  data = data.frame(x=2:3, y=3:3),
  plotConfiguration = logConfigNoTick
)

logConfigTick <- ObsVsPredPlotConfiguration$new(
  xScale = Scaling$log, 
  yScale = Scaling$log
)
logConfigTick$xAxis$ticks <- 2:3
logConfigTick$yAxis$ticks <- 2:3
logPlotTick <- plotObsVsPred(
  data = data.frame(x=2:3, y=2:3),
  plotConfiguration = logConfigTick
)

patchwork::wrap_plots(logPlotTick, logPlotNoTick)

Created on 2024-03-12 with reprex v2.0.2

@PavelBal PavelBal transferred this issue from Open-Systems-Pharmacology/OSPSuite-R Mar 13, 2024
@PavelBal PavelBal changed the title Some snapshots broke after TLF update Ticks and axes are not always shown Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants