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

add shape parameter for PlotBMRSummary #1525

Merged
merged 10 commits into from
Mar 2, 2018
Merged

add shape parameter for PlotBMRSummary #1525

merged 10 commits into from
Mar 2, 2018

Conversation

QuayAu
Copy link
Contributor

@QuayAu QuayAu commented Feb 16, 2017

This is a PR for #1470

This is still work in progress, as I need to add a unit test, that catches the problem that changing the shape parameter didn't have any effect.
Is there any simple way to test if generated ggplots are the same?

@@ -53,8 +53,10 @@ plotBMRSummary = function(bmr, measure = NULL, trafo = "none", order.tsks = NULL
levels(df$learner.id) = getBMRLearnerShortNames(bmr)
}

p = ggplot(df, aes_string(x = meas.name, y = "task.id", col = "learner.id"))
p = ggplot(df, aes_string(x = meas.name, y = "task.id", col = "learner.id", shape = "learner.id"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really want to hardcode this right?

p = p + geom_point(size = pointsize, position = position_jitter(width = 0, height = jitter))
# set shape to standard shape 19
p = p + scale_shape_manual(values = rep(19, length(getBMRLearnerShortNames(bmr))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look at #1523, this might be problematic for wrapped learners

@berndbischl
Copy link
Member

what is the status here? work in progress? or ready for review?

@QuayAu
Copy link
Contributor Author

QuayAu commented Mar 6, 2017

Work in progress, will have a look at it tomorrow

Copy link
Member

@larskotthoff larskotthoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an example to the documentation that shows how to use this please?

@larskotthoff
Copy link
Member

What's the status here @QuayAu ?

@giuseppec
Copy link
Contributor

Looks good to me. We internally set the shape to the default (using scale_shape_manual). This allows us to change the shape and replace the default from the outside using scale_shape_manual. This was not possible before this PR.

@giuseppec
Copy link
Contributor

@QuayAu can you add an example as requested by @larskotthoff ?

@pat-s pat-s merged commit 56eaa20 into mlr-org:master Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants