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

not respecting spacings in ggplot #143

Open
fernandoroa opened this issue Dec 17, 2023 · 2 comments
Open

not respecting spacings in ggplot #143

fernandoroa opened this issue Dec 17, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@fernandoroa
Copy link

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
@eitsupi
Copy link
Contributor

eitsupi commented Dec 17, 2023

Maybe font issue? #138

@benz0li
Copy link
Contributor

benz0li commented Jan 18, 2024

@fernandoroa Use figure spaces. See also non-breaking space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants