Jump to content
You must now use your email address to sign in [click for more info] ×

Import or open pdf incorrectly displayed


Jhsmit

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)

plt.savefig('Errorbar_graph.pdf')

```

 

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

 

 

image.png

affnity_result.png

Errorbar_graph.pdf

Link to comment
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 comment
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.

Guest
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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | 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.