-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from opensafely-core/convert-images
Add convert utility for output images.
- Loading branch information
Showing
5 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
# needed by stata | ||
libpng16-16 | ||
libtinfo5 | ||
libpng16-16 | ||
libtinfo5 | ||
libncurses5 | ||
# python | ||
libpython3.11 | ||
python3.11 | ||
python3.11-distutils | ||
python3-pip | ||
python3.11-venv | ||
# to generate more formats, as stata on linux can only do eps/svg/tiff | ||
ghostscript | ||
imagemagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
* Create a simple dataset | ||
set obs 10 // Create 10 observations | ||
gen x = _n // Create variable x as the observation number | ||
gen y = x^2 // Create variable y as x squared | ||
|
||
* Generate a scatterplot of y vs. x | ||
graph twoway scatter y x, title("Test Graph") xlabel(, grid) ylabel(, grid) | ||
|
||
* Save the graph as a file | ||
graph export "test.eps", replace | ||
|
||
* convert to png using convert utility | ||
! convert test.eps test.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters