Skip to content

Responsive plots #421

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
Fractally opened this issue Mar 11, 2016 · 2 comments
Closed

Responsive plots #421

Fractally opened this issue Mar 11, 2016 · 2 comments

Comments

@Fractally
Copy link

Hey guys

I've noticed that when I embed an online plot from plotly into a local html file on my PC, it is responsive and changes beautifully with my browser width. I also noticed the following:

  1. When I generate a plot in Python and save it to file (output_type='file') and afterwards embed the plot into my local html file, the size changes only when I reload my local html file.
  2. When I generate a plot in Python and save it to div (output_type='div') and afterwards embed the plot into my local html file, the size is completely fixed.

Now I am currently embedding the plots with an iframe like this:

<div class="chart-stage">
            <iframe width="100%" height="480px" frameborder="0" scrolling="no" src="https://plot.ly/~jackp/10002.embed"></iframe>
</div>

How can I get the offline plots to be responsive like the online plotly plots that I embed? I'm asking just in case there is already functionality for this that I might have missed. What is the preferred way to get these offline plots to behave like the online plots?

@Fractally
Copy link
Author

Update: My issue was related to cufflinks. By using a custom layout, I could fix the issue I was having.

@tdrobbin
Copy link

tdrobbin commented Aug 3, 2016

Fractally, could you elaborate on how you were able to generate responsive charts with cufflinks?

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