httpgd icon indicating copy to clipboard operation
httpgd copied to clipboard

not respecting spacings in ggplot

Open fernandoroa opened this issue 6 months ago • 2 comments

Description In VSCode, while using

{
  "r.plot.useHttpgd": true,
}

in settings.json, instead of false, which doesn't show the problem, the font, or the spacings of it are not respected

To Reproduce Make a ggplot and use mono

library(readr)
library(dplyr)
library(ggplot2)

salary_data_file <- "https://raw.githubusercontent.com/datavizpyr/data/master/SO_data_2019/2019_Stack_Overflow_Survey_Education_Salary_US.tsv"
salary_data <- read_tsv(salary_data_file)
salary_data[salary_data$Education == "Bachelor's",]$Education <- "123   789   345"
salary_data[salary_data$Education == "Master's",]$Education   <- "12345 789 12345"

salary_data %>% 
  ggplot(aes(x=Education, y=CompTotal)) +
  geom_boxplot()+
    coord_flip() +
    theme(
      axis.text.y = element_text(family = "mono", size = rel(1))
    )

Expected behavior To see correctly the font and spacing as when using false, respect number of spaces

Screenshots with: false Screenshot from 2023-12-17 09-19-25

with: true Screenshot from 2023-12-17 09-14-03

Environment:

  • OS: Linux, Ubuntu 23.04
  • VSCode Version: 1.85.1
  • R Version: 4.3.1
  • httpgd version: 1.3.1

fernandoroa avatar Dec 17 '23 14:12 fernandoroa