Skip to content
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# bayesplot (development version)

* Remove y-axis line from density, histogram, dot, violin, and frequency polygon plots where the y-axis has no meaningful scale
Comment thread
utkarshpawade marked this conversation as resolved.
Outdated
* New functions `mcmc_dots` and `mcmc_dots_by_chain` for dot plots of MCMC draws by @behramulukir (#402)
* Default to `quantiles=100` for all dot plots by @behramulukir (#402)

Expand Down
2 changes: 2 additions & 0 deletions R/mcmc-distributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ mcmc_dots_by_chain <- function(
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(on = n_param == 1)
}

Expand Down Expand Up @@ -641,6 +642,7 @@ mcmc_dots_by_chain <- function(
yaxis_text(FALSE) +
yaxis_ticks(FALSE) +
yaxis_title(on = n_param == 1 && violin) +
theme(axis.line.y = element_blank()) +
xaxis_title(on = n_param == 1)
}

Expand Down
7 changes: 6 additions & 1 deletion R/ppc-distributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ ppc_dens_overlay <-
yaxis_title(FALSE) +
xaxis_title(FALSE) +
yaxis_text(FALSE) +
yaxis_ticks(FALSE)
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank())
}


Expand Down Expand Up @@ -367,6 +368,7 @@ ppc_dens <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE) +
facet_bg(FALSE)
Expand Down Expand Up @@ -407,6 +409,7 @@ ppc_hist <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE) +
facet_bg(FALSE)
Expand Down Expand Up @@ -453,6 +456,7 @@ ppc_freqpoly <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE)
}
Expand Down Expand Up @@ -559,6 +563,7 @@ ppc_dots <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE) +
facet_bg(FALSE)
Expand Down
5 changes: 5 additions & 0 deletions R/ppd-distributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ ppd_dens_overlay <-
xaxis_title(FALSE) +
yaxis_text(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
legend_none()
Comment thread
utkarshpawade marked this conversation as resolved.
}

Expand Down Expand Up @@ -151,6 +152,7 @@ ppd_dens <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE)
}
Expand Down Expand Up @@ -189,6 +191,7 @@ ppd_hist <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE)
}
Expand Down Expand Up @@ -226,6 +229,7 @@ ppd_dots <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE)
}
Expand Down Expand Up @@ -270,6 +274,7 @@ ppd_freqpoly <-
yaxis_text(FALSE) +
yaxis_title(FALSE) +
yaxis_ticks(FALSE) +
theme(axis.line.y = element_blank()) +
xaxis_title(FALSE) +
facet_text(FALSE) +
legend_none()
Expand Down
5 changes: 0 additions & 5 deletions tests/testthat/_snaps/mcmc-distributions/mcmc-dens-alpha.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions tests/testthat/_snaps/mcmc-distributions/mcmc-dens-bounds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions tests/testthat/_snaps/mcmc-distributions/mcmc-hist-alpha.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new figure seems still to have y-axis line

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions tests/testthat/_snaps/mcmc-distributions/mcmc-hist-freq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

y-axis for violin is meaningful and y-axis should not be removed. Also y-axis should have some ticks and tick labels to indicate the range of values

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading