Closed specbug closed 1 year ago
Same
@specbug have you been able to use other NLTK plots, such as draw()
? I am just getting the TclError: no display name and no $DISPLAY environment variable
and would be happy to know how to work around it
Working through the NLTK examples from here, I'm able to produce the Lexical Dispersion plot:
Since this issue was filed a while ago, if you are still experiencing the issue, please open a new bug and provide a minimal reproducible notebook there.
Could someone please say how this issue was fixed? I cannot get the dispersion plot to display. My code follows: `import nltk import matplotlib from nltk.book import * from nltk.draw.dispersion import dispersion_plot
text1.concordance("survived") text2.similar("monstrous") text2.common_contexts(["monstrous", "very"]) text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"]) ` I do not understand what is going wrong. Is it that the plot is printing but is printing too fast to be seen? If so, is there a way to keep the plot onscreen? Has the function changed somehow? Anyone have any insights about this?
NLTK dispersion plot for a text, as displayed here , only seems to plot the axis and labels and doesn't plot the actual dispersion data points in the graph ,as shown in the figure below.