Jump to content

Recommended Posts

I'm generating a pdf from python with the following code:

import numpy as np
import matplotlib.pyplot as plt

x = np.arange(10)
y = np.ones_like(x)
yerr = 5*np.ones_like(x)
fig, ax = plt.subplots()
ax.errorbar(x, y, yerr=yerr, fmt='o')
ax.set_ylim(0, 2)




When I import (drop and drag) or open the file in Affinity Publisher or Designer, the graph is not shown correctly. The errorbars are extending over the graph's axis. Opening in Adobe reader does work correctly. I've attached a screenshot of what it should look like vs the affinity result. It seems that the errorbars aren't 'clipped' correctly on the axis.


I'm using publisher/designer v1.8.5.703






Link to post
Share on other sites

For those who also run into this issue: my current workaround is to convert the .pdf file to .svg with pdf2svg. The resulting .svg file does show correctly.

Exporting to .eps from matplotlib is also an option, however not for my use case this as .eps does not support rasterization.

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.