Skip to content

Commit

Permalink
ggparcoord(splineFactor = TRUE) now displays breaks (#279)
Browse files Browse the repository at this point in the history
* splineFactor = TRUE now uses a continuous scale

* added news
  • Loading branch information
schloerke committed May 17, 2018
1 parent 1d30777 commit e7167eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ GGally 1.3.3

* Added `sort` parameter to sort by beta values (#273)

`ggparcoord`

* Fixed bug where x axis breaks and labels did not appear when `splineFactor = TRUE` (#279)



GGally 1.3.2
Expand Down
6 changes: 5 additions & 1 deletion R/ggparcoord.R
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,11 @@ ggparcoord <- function(

xAxisLabels <- levels(data.m$variable)
# while continuous data, this makes it present like it's discrete
p <- p + scale_x_discrete(breaks = seq_along(xAxisLabels), labels = xAxisLabels)
p <- p + scale_x_continuous(
breaks = seq_along(xAxisLabels),
labels = xAxisLabels,
minor_breaks = FALSE
)

} else {
if (alphaLinesIsCharacter) {
Expand Down

0 comments on commit e7167eb

Please sign in to comment.