question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table exports with a long line in PDFs

See original GitHub issue

related to: https://github.com/plotly/orca/issues/147 and https://github.com/plotly/streambed/issues/11618

The PDF exports display line in the following environments:

  • Windows 10 / Chrome viewer
  • Windows 10 / Adobe-reader
  • MacOS10.13 / Chrome70

Example :

import plotly.plotly as py
import plotly.graph_objs as go

import pandas as pd
import colorlover as cl

colors = cl.scales['5']['seq']['Blues']
data = {'Year' : [2010, 2011, 2012, 2013, 2014],
        'Color' : colors}
df = pd.DataFrame(data)


trace0 = go.Table(
  header = dict(
    values = ["Color", "<b>YEAR</b>"],
    line = dict(color = 'white'),
    fill = dict(color = 'white'),
    align = ['center'],
    font = dict(color = 'black', size = 12)
  ),
  cells = dict(
    values = [df.Color, df.Year],
    line = dict(color = [df.Color]),
    fill = dict(color = [df.Color]),
    align = 'center',
    font = dict(color = 'black', size = 11)
    ))

data = [trace0]

py.iplot(data, filename = "row variable color")

capture

Please note that this behavior is happening only when saving via Python API call and exporting via the plot’s view page at plot.ly. I don’t see the line when saving/exporting via Chart studio.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
priyatharsancommented, Nov 22, 2018

Do you see a line here?

@jonmmease No I don’t see any line.

this version is not relevant if you’re exporting to a PDF through chart studio.

Apologies for the confusion and it makes more sense now as when I tried with plotly.py’s plotly.io.write_image I don’t see any line so this has something to do with the Chart Studio itself. Thank you for clarifying this.

@etpinard Thank you for the update I will follow-up with issue’s status at https://github.com/plotly/streambed/issues/11618

0reactions
vishalsharma3003commented, Feb 27, 2020

I had the same problem and there is not much information provided. I don’t know the exact reason why the erroneous line is there in these graphs but I have a workaround for this. Try setting the background color of the graph and you’ll notice that the line is aligned with the background so I adjusted the margins and put the right margin to zero and the problem was resolved.

layout(margin = list(r = 0, pad = 0))

Before: image

After: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

word table borders displaying erratically in PDF
I believe this is a symptom of an issue that has existed in PDF files for a long time, where thin lines are...
Read more >
Word to PDF Table lines missing or faded | Adobe Acrobat
Word to PDF Table lines missing or faded · 1 highlighting the cell(s) · 2 open Table Properties dialogue box - Cell tab...
Read more >
PDF: Table borders not showing - CyberText Newsletter
PDF : Table borders not showing · Open Adobe Reader and/or Acrobat X Standard/Pro. · Go to Edit > Preferences. · Select Page...
Read more >
How to extract data out of a PDF - Datawrapper Academy
Click on "Browse" and then "Import" to open the PDF with the data table you want to extract. Don't upload the full PDF...
Read more >
Convert Word (table) to PDF - missing/incorrect lines/borders
FWIW, formatting the table's layout as 'around' and repositioning it ever-so-slightly can affect the way pdf viewers display it. Of course, you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found