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

Gadfly boxplot is getting plotted like a vertical straight line (missing the box part) #1584

Open
rkmalaiya opened this issue May 26, 2022 · 1 comment

Comments

@rkmalaiya
Copy link

Hi,

Sorry for reposting this issue, but I couldn't reach to a solution here, hence reposting the issue in github.

I am trying to make a boxplot using Gadfly but all I see are straight vertical lines. Also, this seems to be a very tricky issue. It only happens for a specific combination of data points, and I am not able to figure out what’s wrong. I have replicated the issue using fake data below, please help me understand what may I be missing?

Also, there are 2 issues that this dataset is causing.

  1. The major issue is that I am seeing all vertical lines
  2. If I try to make the plot differently, I do see box plots but then the left most and the right most end of the plot is getting trimmed away.

Fake Data

df_plot = vcat(
DataFrame(model = repeat([“one”,“two”, “three”],inner=242),
type = repeat([“type1”],outer=726),
data=rand(726)),

DataFrame(model = repeat([ “four”, “five”, “six”],inner=242),
type = repeat([“type2”],outer=726),
data=rand(726)))

image

Some more information about the data
image

Plot (issue 1)

Gadfly.plot(df_plot,
x = :type,
y=:data,
color=:model,
Geom.boxplot
)

image

Plot (issue 2)

Gadfly.plot(df_plot,
x=:model,
y=:data,
color = :type, # swapped color and x aesthetics
Geom.boxplot,
)

image

I tried to increase the width of the plot using

set_default_plot_size(10inch, 4inch)

but the issue still remains
image

Thank you for all the help!

@Mattriks
Copy link
Member

Another example of issue 1 above in #1130

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

No branches or pull requests

2 participants