TutteInstitute / datamapplot

Creating beautiful plots of data maps
MIT License
489 stars 34 forks source link

Can't add logo image from working directory path #22

Open Ibrokhimsadikov opened 5 months ago

Ibrokhimsadikov commented 5 months ago

Hello,

I have tried rendering interactive plot with logo image from local directory but it is not showing the image, only url image is working, I checked from documentation and it says only url allowed, is there any workaround?

Thanks!

lmcinnes commented 5 months ago

I believe that a relative path and serving the output html (and logo image) should work. If you just want this locally then simple.http module should be enough, just make sure that the logo file is in the same directory or subdirectory of where you are running the server so it can serve the file as well.

Ibrokhimsadikov commented 5 months ago

The problem is that it is not even showing logo image in jupyter nootbook, when I try to point path to logo image

plot = datamapplot.create_interactive_plot( arxivml_data_map, arxivml_label_layers[0], arxivml_label_layers[2], arxivml_label_layers[4], hover_text = arxiv_hover_data, font_family="Playfair Display SC", title="ArXiv Machine Learning Landscape", sub_title="A data map of papers from the Machine Learning section of ArXiv", logo = "path/to/logo.png" logo_width=180, on_click="window.open(http://google.com/search?q=\"{hover_text}\")", enable_search=True, darkmode=True, ) plot

lmcinnes commented 5 months ago

I'm not sure there's a fix for it within the notebook unfortunately.