Skip to content

3.5.0 displays raw title dict in online plot.ly figure tab titles #1394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zig1000 opened this issue Jan 12, 2019 · 2 comments
Closed

3.5.0 displays raw title dict in online plot.ly figure tab titles #1394

zig1000 opened this issue Jan 12, 2019 · 2 comments

Comments

@zig1000
Copy link

zig1000 commented Jan 12, 2019

May not be a bug you control, but hopefully you can pull some strings...
In Plotly 3.5.0, when a figure is published online to https://plot.ly/, the tab title (which used to say e.g. Title Text | Scatter Chart made by...) now shows the new layout title dict in place of Title Text (e.g. { 'text': '...', 'font':16} | Chart made by ...}).
Tested in Chrome. Not an issue as of at least plotly 3.4.1.

Don't want to advertise the live example, but something like this code should reproduce it:

import plotly
import plotly.graph_objs as go

dummy_trace = go.Scatter(x=[], y=[],
    hoverinfo='none',
    showlegend=False,
    mode='markers',
    marker=dict(
        color=[],
        size=5,
        line=dict(width=1)))

fig_layout = go.Layout(
    title='<br><b>Plotly 3.5.0 Test</b>', # This
    titlefont=dict(size=16),              # and this, show up as json in the plot.ly tab title
    showlegend=True,
    legend=dict(x=0.9, y=0.95),
    hovermode='closest',
    dragmode='pan',
    margin=dict(b=5, l=5, r=5, t=40, pad=0),
    annotations=[ dict(
        text="(not relevant to the bug)",
        showarrow=False,
        xref="paper", yref="paper",
        x=1.0, y=1.0) ],
    xaxis=dict(showgrid=False, zeroline=False, showticklabels=False),
    yaxis=dict(showgrid=False, zeroline=False, showticklabels=False,
               scaleanchor='x', scaleratio=1, range=[-0.05, 1.05]))
                   
fig = go.Figure(data=[dummy_trace], # Obfuscated data since probably not relevant to the bug
                layout=fig_layout)
                   
plotly.plotly.plot(fig, filename='Plotly_3_5_0_bug', sharing='public')

Also while I'm here I thought I'd ask if you know of ways to do / whether there's anything in the pipeline for a couple of small wants:

  • left-aligning hover text, as discussed here: Text align when hover on scatterplot plotly.js#260 , since any multi-line hover boxes that appear left of a data point have very ugly text as a result.

  • A python-side way to prevent a trace from being hidden when other traces are double-clicked in the legend

@jonmmease
Copy link
Contributor

Hi @zig1000,

Thanks for taking the time to report this. I've passed it along to the folks that work on the web interface.

Also while I'm here I thought I'd ask if you know of ways to do / whether there's anything in the pipeline for a couple of small wants:

left-aligning hover text, as discussed here: plotly/plotly.js#260 , since any multi-line hover boxes that appear left of a data point have very ugly text as a result.

plotly/plotly.js#260 is where this would need to happen, so +1 the issue if you haven't already 🙂

A python-side way to prevent a trace from being hidden when other traces are double-clicked in the legend

Could you open a new issue on this? It would be possible to expose the legend click events (https://plot.ly/javascript/plotlyjs-events/#legend-click-events) to Python when using the FigureWidget. But I'm not sure what we could do for the non-FigureWidget case.

@jonmmease
Copy link
Contributor

Closing as this has been fixed in chart studio. Thanks again for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants