Skip to content

Commit

Permalink
Add c2st failure figure
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Feb 6, 2024
1 parent f68c085 commit 0aa57fe
Show file tree
Hide file tree
Showing 8 changed files with 22,432 additions and 0 deletions.
Binary file added docs/notebooks/c2st/fig/fig.pdf
Binary file not shown.
Binary file added docs/notebooks/c2st/fig/fig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
740 changes: 740 additions & 0 deletions docs/notebooks/c2st/fig/fig.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10,112 changes: 10,112 additions & 0 deletions docs/notebooks/c2st/svg/densities.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9,718 changes: 9,718 additions & 0 deletions docs/notebooks/c2st/svg/illustration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,014 changes: 1,014 additions & 0 deletions docs/notebooks/c2st/svg/panel_a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
820 changes: 820 additions & 0 deletions docs/notebooks/c2st/svg/panel_b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions docs/notebooks/c2st/tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from invoke import task
from pathlib import Path

basepath = "/Users/michaeldeistler/Documents/phd/labproject/docs/notebooks/c2st"

open_cmd = "open"

fig_names = {"1": "fig"}


@task
def ConvertFile(c, fig):
_convertsvg2pdf(c, fig)
_convertpdf2png(c, fig)


@task
def _convertsvg2pdf(c, fig):
pathlist = Path(f"{basepath}/{fig_names[fig]}/").glob("*.svg")
for path in pathlist:
c.run(f"inkscape {str(path)} --export-pdf={str(path)[:-4]}.pdf")


@task
def _convertpdf2png(c, fig):
pathlist = Path(f"{basepath}/{fig_names[fig]}/").glob("*.pdf")
for path in pathlist:
c.run(f'inkscape {str(path)} --export-png={str(path)[:-4]}.png -b "white" --export-dpi=250')

0 comments on commit 0aa57fe

Please sign in to comment.