santosjorge / cufflinks

Productivity Tools for Plotly + Pandas
MIT License
3.03k stars 675 forks source link

Filename parameter for offline plots? #55

Open ghost opened 7 years ago

ghost commented 7 years ago

Can the filename option be passed as the local filename (HTML) to be stored on the user's computer when cufflinks is in offline mode?

santosjorge commented 7 years ago

Hi @CercaTrova - not sure I understand the question. Why would you require an HTML filename?

TristanBoudreault commented 7 years ago

I have the same workflow. Basically I generate plots but not in a notebook. I do my interactive analysis in PyCharm and when I want to see a plot, I have to generate an html file and open it with a browser. To achieve that I replaced this line with the following code:

if not online:
    return offline.py_offline.plot(figure, filename=filename, validate=validate)
else:
    return py.plot(figure, sharing=sharing, filename=filename, validate=validate)
TristanBoudreault commented 7 years ago

I can make a PR if you want

ghost commented 7 years ago

Yes that would be nice. Sorry for getting to this so late, I saw it and then forgot about it until now. My use case is the same as above, I don't use Plotly in online mode, I only use their open source library so I would like there to be an entirely offline option if possible that handles all offline capabilities. The above PR is useful to me as well as perhaps others who have the same workflow.

LeTristanB commented 6 years ago

Took me awhile but got around to do the PR: https://github.com/santosjorge/cufflinks/pull/82