Skip to content

Conversation

@marc-wien
Copy link

Legacy behavior does not change if DPI argument is excluded. DPI argument ignored if Rasterize argument excluded.

@marc-wien
Copy link
Author

Also want to add example in Quickstart.ipynb after Out[29] but couldn't resolve merging it in easily.

Something like:

Markdown cell:

You can also set the DPI of your raster for print-quality PNG images without modifying the TikZ scale
(Note: you can also set a max render width in a JupyterLab notebook for high-DPI images to force it to fit on screen using the commented-out command in the following cell)

Code cell (intentionally commented out):

# from IPython.core.display import display, HTML
# display(HTML("<style>.jp-RenderedImage img { width: 100%; max-width: 400px }</style>"))

Code cell:

%%itikz --implicit-pic --temp-dir --rasterize --dpi=300
\draw[fill=black] (1, 1) rectangle (2, 2);
\draw[fill=black] (2, 1) rectangle (3, 2);
\draw[fill=black] (3, 1) rectangle (4, 2);
\draw[fill=black] (3, 2) rectangle (4, 3);
\draw[fill=black] (2, 3) rectangle (3, 4);

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.

1 participant