Include "a" character in a wordcloud

1 visualización (últimos 30 días)
Lairenlakpam Joyprakash Singh
Lairenlakpam Joyprakash Singh el 28 de Nov. de 2018
I am just trying to plot a simple wordcloud of grades which has a grade string, say,
grade='DBBBDBEFBFFASBCBABCCSBCAABBCBACDBFDBAFDAACAFAACABBFABCBAACF'
when I plot it using,
>>wordcloud(grade)
the function removes all Grade A information. How do I include the grade A in the plot?
  7 comentarios
Greg
Greg el 29 de Nov. de 2018
As in Guillaume's answer, the key missing piece in the original post is the transpose. Given:
grade='DBBBDBEFBFFASBCBABCCSBCAABBCBACDBFDBAFDAACAFAACABBFABCBAACF';
The following does not work:
wordcloud(grade);
But the transpose does ("work" meaning create a word cloud, but with "A" removed):
wordcloud(grade');
Lairenlakpam Joyprakash Singh
Lairenlakpam Joyprakash Singh el 29 de Nov. de 2018
Function takes column matrix. That's why!

Iniciar sesión para comentar.

Respuesta aceptada

Guillaume
Guillaume el 28 de Nov. de 2018
Editada: Guillaume el 28 de Nov. de 2018
Bear in mind that this is with base matlab. The text analytics toolbox, which I don't have, may have some better ways of doing what you want.
I'm simply converting your char array into a categorical array. It doesn't look like wordcloud does any filtering on categorical arrays:
grade='DBBBDBEFBFFASBCBABCCSBCAABBCBACDBFDBAFDAACAFAACABBFABCBAACF'
wordcloud(categorical(cellstr(grade')))
displays

Más respuestas (0)

Categorías

Más información sobre Display and Presentation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by