Table exports with a long line in PDFs
See original GitHub issuerelated 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")
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:
- Created 5 years ago
- Comments:8 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jonmmease No I don’t see any line.
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
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:
After: