When using the pyLDAvis package as follows, inside my jupyter notebook,
pyLDAvis.enable_notebook()
lda_tfidf = LatentDirichletAllocation(n_components=20, random_state=0)
lda_tfidf.fit(dtm_tfidf)
pyLDAvis.sklearn.prepare(lda_tf, dtm_tf, tf_vectorizer)
The resulting plot autosizes the width of my jupyter notebook, making all of the other cells overlap with the boarder - I have tried:
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:95% !important; }</style>"))
with no luck, as well as
# Using gensim[![enter image description here][1]][1]
v = pyLDAvis.gensim.prepare(lda_model, doc_term_matrix, dictionary)
pyLDAvis.display(v)
spending a while searching the docs.... There dosen't seem to be anything about this is the documentation, has anyone dug into the code before and can point me in the right direction?
There does not seem to be any other posts of this, but have checked versions etc... with no luck
An image of the overlap is shown below:
Have you tried using %matplotlib inline ? I have a similar code and the displays it's fine. Here is my example:
EDIT: I did had the same problem in my Jupyter Notebook (the overlap was for the output area) . I manage to have a better display by changing the style before calling pyLDAvis.display:
Specially changing the output_area and input_area and setting the max-width (not the width)