update barplot documentation for plot.horizontal #163
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A very common plot we make in the lab is a heatmap with a barplot on the right, using
plot.horizontal = TRUE
.For the heatmap, I typically use
same.as.matrix = TRUE
when not clustering, thus I know the order of row/columns of the input data will exactly match the order in the plot. Then I make sure the barplot data rows are in the same order as the heatmap data rows, and usedisable.factor.sorting = TRUE.
However, the order of rows in the heatmap and barplot get misaligned in this approach, that's because
create.barplot
fills in the bars from the bottom to the top of the plot, although I assumed the opposite (i.e. I thought the order of rows in the barplot would match the order of rows in the input data).Thus I updated the documentation to try and clarify this.
Closes #...
Checklist
This PR does NOT contain PHI or germline genetic data. A repo may need to be deleted if such data is uploaded. Disclosing PHI is a major problem.
This PR does NOT contain molecular files, compressed files, output files such as images (e.g.
.png
, .jpeg
),.pdf
,.RData
,.xlsx
,.doc
,.ppt
, or other non-plain-text files. To automatically exclude such files using a .gitignore file, see here for example.I have read the code review guidelines and the code review best practice on GitHub check-list.
I have set up or verified the
main
branch protection rule following the github standards before opening this pull request.The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
I have added the major changes included in this pull request to the
NEWS
under the next release version or unreleased, and updated the date. I have also updated the version number inDESCRIPTION
according to semantic versioning rules.Both
R CMD build
andR CMD check
run successfully.Testing Results
see example in comment below