I am trying to add a logo/image to a plotly express chart in a jupyter notebook. However, no matter what sizing for the photo I select, it always comes out blurry. The chart itself is sharp, the exports of the chart are sharp, but the logo I add onto the chart is super blurry… I have tried changes sizes of both the image and the display, helps a bit, but never sharp… please help!
I think ti might have something to do with this thread here, but don’t know how to translate this dash/asset folder type stuff to my context of a jupyter notebook:
My code is below:
included = relevant_df
fig = px.line(included,
x='date', y='contri_1yr_qual', color='url_short',
hover_data=["id", "createdAt", 'first_inst'],
category_orders={"url_short": list(included.url_short[:20])})
fig.update_layout(title={
'text': "Active Qualified Contributors Over Time - SRE stack",
'y':0.95,
'x':0.5,
'xanchor': 'center',
'yanchor': 'top'}, width=1000, height=600)
# ------- THIS IS THE PROBLEM BELOW
fig.add_layout_image(
dict(
source='rajko_sig2.svg',
xref="paper", yref="paper",
x=0.02, y=0.8,
sizex=0.4, sizey=0.5,
sizing = 'contain',
xanchor="left", yanchor="bottom"
)
)
fig.show()