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

Use ggsave instead of pdf - dev.off to save plots #148

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

albhasan
Copy link
Contributor

@albhasan albhasan commented Nov 3, 2023

Remove the calls to pdf and dev.off to save plots in lesson 8. We use ggsave instead since it fits better with plots built using the ggplot2package.

This PR:

  • Updates the text in lesson 8.
  • Updates challenge 1 in lesson 8.

Closes #121

Copy link

github-actions bot commented Nov 3, 2023

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/datacarpentry/r-intro-geospatial/compare/md-outputs..md-outputs-PR-148

The following changes were observed in the rendered markdown documents:

 08-writing-data.md | 63 +++++++++++++++++++++++++-----------------------------
 md5sum.txt         |  2 +-
 2 files changed, 30 insertions(+), 35 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2024-01-11 14:01:20 +0000

github-actions bot pushed a commit that referenced this pull request Nov 3, 2023
Copy link
Contributor

@sstevens2 sstevens2 left a comment

Choose a reason for hiding this comment

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

This change looks good to me.

Optional addition might be showing learners how to save a plot to an object and then explicitly save a plot object. I've added something similar to my something I'm customizing of the genomics R lesson but I don't think it is necessary.

github-actions bot pushed a commit that referenced this pull request Jan 11, 2024
@albhasan albhasan merged commit 397ea0c into datacarpentry:main Jan 11, 2024
3 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 11, 2024
Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Jan 11, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Jan 16, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Jan 23, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Jan 30, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Feb 6, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Feb 13, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Feb 20, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Feb 27, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Mar 5, 2024
Auto-generated via {sandpaper}
Source  : 0ab69c2
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-01-11 14:09:55 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Mar 12, 2024
Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Mar 12, 2024
Auto-generated via {sandpaper}
Source  : 266eedb
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-12 00:35:10 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Mar 19, 2024
Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Mar 19, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Mar 26, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Apr 2, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Apr 9, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Apr 16, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Apr 23, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request Apr 30, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request May 7, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
github-actions bot pushed a commit that referenced this pull request May 14, 2024
Auto-generated via {sandpaper}
Source  : bbf1ffe
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-03-19 00:21:09 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 397ea0c
Branch  : main
Author  : Alber Sánchez <[email protected]>
Time    : 2024-01-11 14:07:23 +0000
Message : Merge pull request #148 from albhasan/ggsave_121

Use ggsave instead of pdf - dev.off to save plots
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

Successfully merging this pull request may close these issues.

ggsave isntead of pdf in writing data
2 participants