How to visualize a list of sequence?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
This is my data, its order has somewhat meaning
data = Uncompress["1:eJzFWFtSwkAQjOJFvI9fegKtUouf8IF6Zo8hUFCVWna2p7sn+MUWIZN59GPC49vu+eN3M037h2manrb7r5fjYfs6f44Om9Nhl/rt/elAhW0/pUyYHK9+i8My4XEvcAI1heKULtHO3/cvz6vnR8TH96zVuyKGFD0hX75CjVrKC0xnkuUTYCYIWVwhJ8cvOiXVkmn5+XNgdTWyozFfVKRYANoJOUOGs7QmQVQXCfQwsX8E/RWWLBcfPob0HdVCUoIVjUlRx/yaQAS1GpTvunBLu1M4UifJRTYeKR2sHpbZX5w0nj2Sm7yGOMy80b15C6Gr6wig4pxRPu2Y9HQr5Ud81/vuvVBQh0LDJyctYqKI6bzUrCaQAkOdTcUC8gIu2bXX6wXCpzGt5GKWq7LUeo3lmref9kJ6y8rzHkgww6wbCZTjfF6QnCCprYA2GUp0vYANLqRcTdzC7YVCmiZimRW0YCSp105ddarL0rVoXSiE8AXrp4I2VLpDg8B+eYBX/KFoEG2OO02aa08TLexgULcZ3x0O7xgQpS1fjnMoy/Q2YMlZmt6QgPKeBCJ0egUKX+9fZEMy1OEMgV1cXnqD5aEYSgHS8TxsDHXTVlqBf04R0foqDBa6azGgce+QzOQb529d89XTop3+LOa8m4fm2rVKruA/lOPnMg=="];
It has many classes
Counts@data
(*<|"iang" -> 580, "iao" -> 315, "ia" -> 64, "ian" -> 15, "ang" -> 19, "van" -> 3, "uan" -> 1, "e" -> 1, "an" -> 2|>*)
But the same class tend to tie together.
I want to visualize this data to see what distribution of data. I use this code but it's too tiny to be seen, is a better way to visualize it?
col = Association[
Thread[Union[data] -> Rescale@Range[Length@Union[data]]]];
Graphics[Raster[data,
ColorFunction -> (ColorData["Rainbow", col[#]] &)]]
visualization
add a comment |Â
up vote
4
down vote
favorite
This is my data, its order has somewhat meaning
data = Uncompress["1:eJzFWFtSwkAQjOJFvI9fegKtUouf8IF6Zo8hUFCVWna2p7sn+MUWIZN59GPC49vu+eN3M037h2manrb7r5fjYfs6f44Om9Nhl/rt/elAhW0/pUyYHK9+i8My4XEvcAI1heKULtHO3/cvz6vnR8TH96zVuyKGFD0hX75CjVrKC0xnkuUTYCYIWVwhJ8cvOiXVkmn5+XNgdTWyozFfVKRYANoJOUOGs7QmQVQXCfQwsX8E/RWWLBcfPob0HdVCUoIVjUlRx/yaQAS1GpTvunBLu1M4UifJRTYeKR2sHpbZX5w0nj2Sm7yGOMy80b15C6Gr6wig4pxRPu2Y9HQr5Ud81/vuvVBQh0LDJyctYqKI6bzUrCaQAkOdTcUC8gIu2bXX6wXCpzGt5GKWq7LUeo3lmref9kJ6y8rzHkgww6wbCZTjfF6QnCCprYA2GUp0vYANLqRcTdzC7YVCmiZimRW0YCSp105ddarL0rVoXSiE8AXrp4I2VLpDg8B+eYBX/KFoEG2OO02aa08TLexgULcZ3x0O7xgQpS1fjnMoy/Q2YMlZmt6QgPKeBCJ0egUKX+9fZEMy1OEMgV1cXnqD5aEYSgHS8TxsDHXTVlqBf04R0foqDBa6azGgce+QzOQb529d89XTop3+LOa8m4fm2rVKruA/lOPnMg=="];
It has many classes
Counts@data
(*<|"iang" -> 580, "iao" -> 315, "ia" -> 64, "ian" -> 15, "ang" -> 19, "van" -> 3, "uan" -> 1, "e" -> 1, "an" -> 2|>*)
But the same class tend to tie together.
I want to visualize this data to see what distribution of data. I use this code but it's too tiny to be seen, is a better way to visualize it?
col = Association[
Thread[Union[data] -> Rescale@Range[Length@Union[data]]]];
Graphics[Raster[data,
ColorFunction -> (ColorData["Rainbow", col[#]] &)]]
visualization
WordCloud[data]
?
â kglr
Aug 29 at 2:01
@kglr If so, it lose order information if using WordCloud or PieChart or something
â partida
Aug 29 at 2:04
Just wondering: Why did you include a link to the raw data given you posted theCounts
data?
â David G. Stork
Aug 29 at 3:58
@DavidG.Stork I post my solution in the following and using the original data so that the sequence of data is maintained.
â partida
Aug 29 at 5:25
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
This is my data, its order has somewhat meaning
data = Uncompress["1:eJzFWFtSwkAQjOJFvI9fegKtUouf8IF6Zo8hUFCVWna2p7sn+MUWIZN59GPC49vu+eN3M037h2manrb7r5fjYfs6f44Om9Nhl/rt/elAhW0/pUyYHK9+i8My4XEvcAI1heKULtHO3/cvz6vnR8TH96zVuyKGFD0hX75CjVrKC0xnkuUTYCYIWVwhJ8cvOiXVkmn5+XNgdTWyozFfVKRYANoJOUOGs7QmQVQXCfQwsX8E/RWWLBcfPob0HdVCUoIVjUlRx/yaQAS1GpTvunBLu1M4UifJRTYeKR2sHpbZX5w0nj2Sm7yGOMy80b15C6Gr6wig4pxRPu2Y9HQr5Ud81/vuvVBQh0LDJyctYqKI6bzUrCaQAkOdTcUC8gIu2bXX6wXCpzGt5GKWq7LUeo3lmref9kJ6y8rzHkgww6wbCZTjfF6QnCCprYA2GUp0vYANLqRcTdzC7YVCmiZimRW0YCSp105ddarL0rVoXSiE8AXrp4I2VLpDg8B+eYBX/KFoEG2OO02aa08TLexgULcZ3x0O7xgQpS1fjnMoy/Q2YMlZmt6QgPKeBCJ0egUKX+9fZEMy1OEMgV1cXnqD5aEYSgHS8TxsDHXTVlqBf04R0foqDBa6azGgce+QzOQb529d89XTop3+LOa8m4fm2rVKruA/lOPnMg=="];
It has many classes
Counts@data
(*<|"iang" -> 580, "iao" -> 315, "ia" -> 64, "ian" -> 15, "ang" -> 19, "van" -> 3, "uan" -> 1, "e" -> 1, "an" -> 2|>*)
But the same class tend to tie together.
I want to visualize this data to see what distribution of data. I use this code but it's too tiny to be seen, is a better way to visualize it?
col = Association[
Thread[Union[data] -> Rescale@Range[Length@Union[data]]]];
Graphics[Raster[data,
ColorFunction -> (ColorData["Rainbow", col[#]] &)]]
visualization
This is my data, its order has somewhat meaning
data = Uncompress["1:eJzFWFtSwkAQjOJFvI9fegKtUouf8IF6Zo8hUFCVWna2p7sn+MUWIZN59GPC49vu+eN3M037h2manrb7r5fjYfs6f44Om9Nhl/rt/elAhW0/pUyYHK9+i8My4XEvcAI1heKULtHO3/cvz6vnR8TH96zVuyKGFD0hX75CjVrKC0xnkuUTYCYIWVwhJ8cvOiXVkmn5+XNgdTWyozFfVKRYANoJOUOGs7QmQVQXCfQwsX8E/RWWLBcfPob0HdVCUoIVjUlRx/yaQAS1GpTvunBLu1M4UifJRTYeKR2sHpbZX5w0nj2Sm7yGOMy80b15C6Gr6wig4pxRPu2Y9HQr5Ud81/vuvVBQh0LDJyctYqKI6bzUrCaQAkOdTcUC8gIu2bXX6wXCpzGt5GKWq7LUeo3lmref9kJ6y8rzHkgww6wbCZTjfF6QnCCprYA2GUp0vYANLqRcTdzC7YVCmiZimRW0YCSp105ddarL0rVoXSiE8AXrp4I2VLpDg8B+eYBX/KFoEG2OO02aa08TLexgULcZ3x0O7xgQpS1fjnMoy/Q2YMlZmt6QgPKeBCJ0egUKX+9fZEMy1OEMgV1cXnqD5aEYSgHS8TxsDHXTVlqBf04R0foqDBa6azGgce+QzOQb529d89XTop3+LOa8m4fm2rVKruA/lOPnMg=="];
It has many classes
Counts@data
(*<|"iang" -> 580, "iao" -> 315, "ia" -> 64, "ian" -> 15, "ang" -> 19, "van" -> 3, "uan" -> 1, "e" -> 1, "an" -> 2|>*)
But the same class tend to tie together.
I want to visualize this data to see what distribution of data. I use this code but it's too tiny to be seen, is a better way to visualize it?
col = Association[
Thread[Union[data] -> Rescale@Range[Length@Union[data]]]];
Graphics[Raster[data,
ColorFunction -> (ColorData["Rainbow", col[#]] &)]]
visualization
visualization
edited Aug 29 at 2:02
asked Aug 29 at 1:27
partida
3,5651234
3,5651234
WordCloud[data]
?
â kglr
Aug 29 at 2:01
@kglr If so, it lose order information if using WordCloud or PieChart or something
â partida
Aug 29 at 2:04
Just wondering: Why did you include a link to the raw data given you posted theCounts
data?
â David G. Stork
Aug 29 at 3:58
@DavidG.Stork I post my solution in the following and using the original data so that the sequence of data is maintained.
â partida
Aug 29 at 5:25
add a comment |Â
WordCloud[data]
?
â kglr
Aug 29 at 2:01
@kglr If so, it lose order information if using WordCloud or PieChart or something
â partida
Aug 29 at 2:04
Just wondering: Why did you include a link to the raw data given you posted theCounts
data?
â David G. Stork
Aug 29 at 3:58
@DavidG.Stork I post my solution in the following and using the original data so that the sequence of data is maintained.
â partida
Aug 29 at 5:25
WordCloud[data]
?â kglr
Aug 29 at 2:01
WordCloud[data]
?â kglr
Aug 29 at 2:01
@kglr If so, it lose order information if using WordCloud or PieChart or something
â partida
Aug 29 at 2:04
@kglr If so, it lose order information if using WordCloud or PieChart or something
â partida
Aug 29 at 2:04
Just wondering: Why did you include a link to the raw data given you posted the
Counts
data?â David G. Stork
Aug 29 at 3:58
Just wondering: Why did you include a link to the raw data given you posted the
Counts
data?â David G. Stork
Aug 29 at 3:58
@DavidG.Stork I post my solution in the following and using the original data so that the sequence of data is maintained.
â partida
Aug 29 at 5:25
@DavidG.Stork I post my solution in the following and using the original data so that the sequence of data is maintained.
â partida
Aug 29 at 5:25
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
6
down vote
accepted
BarChart[Values@Counts[data], ColorFunction -> "Rainbow",
BarSpacing -> 0, 0, Frame -> False, Axes -> False,
BarOrigin -> Left, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5, AspectRatio -> 1/10, ImageSize -> 500]
Use Log @ Values @ Counts[data]
as the first argument to get
Update: An alternative is to use ArrayComponents
to code data
and use MatrixPlot
:
MatrixPlot[ArrayComponents[data],
ColorFunction -> "Rainbow", Frame -> False, AspectRatio -> 1/5,
ImageSize -> Length[data]]
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.
â partida
Aug 29 at 2:25
@partida, thank you for the accept.Tooltip
is a great idea.
â kglr
Aug 29 at 2:25
I see there is a large white in the background, could you tell me how to delete it such asImageCrop
do? Thanks
â partida
Aug 29 at 2:26
@partida, in the updated version i usedPlotRange
to get rid of the white background.
â kglr
Aug 29 at 2:27
 |Â
show 1 more comment
up vote
2
down vote
Counts@data
lose the order information.
But it may make the question more complicated.
Now the sequence of data is maintained, looks not beautiful.
BarChart[Tooltip[
Function[val, Style[val, ColorData["Rainbow", col[First@#]]]]
@Length@#, First@#] & /@ Split[data],
BarSpacing -> 0, 0, Frame -> False, Axes -> False, BarOrigin -> Left,
AspectRatio -> 1/10, ImageSize -> 500, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5]
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
BarChart[Values@Counts[data], ColorFunction -> "Rainbow",
BarSpacing -> 0, 0, Frame -> False, Axes -> False,
BarOrigin -> Left, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5, AspectRatio -> 1/10, ImageSize -> 500]
Use Log @ Values @ Counts[data]
as the first argument to get
Update: An alternative is to use ArrayComponents
to code data
and use MatrixPlot
:
MatrixPlot[ArrayComponents[data],
ColorFunction -> "Rainbow", Frame -> False, AspectRatio -> 1/5,
ImageSize -> Length[data]]
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.
â partida
Aug 29 at 2:25
@partida, thank you for the accept.Tooltip
is a great idea.
â kglr
Aug 29 at 2:25
I see there is a large white in the background, could you tell me how to delete it such asImageCrop
do? Thanks
â partida
Aug 29 at 2:26
@partida, in the updated version i usedPlotRange
to get rid of the white background.
â kglr
Aug 29 at 2:27
 |Â
show 1 more comment
up vote
6
down vote
accepted
BarChart[Values@Counts[data], ColorFunction -> "Rainbow",
BarSpacing -> 0, 0, Frame -> False, Axes -> False,
BarOrigin -> Left, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5, AspectRatio -> 1/10, ImageSize -> 500]
Use Log @ Values @ Counts[data]
as the first argument to get
Update: An alternative is to use ArrayComponents
to code data
and use MatrixPlot
:
MatrixPlot[ArrayComponents[data],
ColorFunction -> "Rainbow", Frame -> False, AspectRatio -> 1/5,
ImageSize -> Length[data]]
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.
â partida
Aug 29 at 2:25
@partida, thank you for the accept.Tooltip
is a great idea.
â kglr
Aug 29 at 2:25
I see there is a large white in the background, could you tell me how to delete it such asImageCrop
do? Thanks
â partida
Aug 29 at 2:26
@partida, in the updated version i usedPlotRange
to get rid of the white background.
â kglr
Aug 29 at 2:27
 |Â
show 1 more comment
up vote
6
down vote
accepted
up vote
6
down vote
accepted
BarChart[Values@Counts[data], ColorFunction -> "Rainbow",
BarSpacing -> 0, 0, Frame -> False, Axes -> False,
BarOrigin -> Left, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5, AspectRatio -> 1/10, ImageSize -> 500]
Use Log @ Values @ Counts[data]
as the first argument to get
Update: An alternative is to use ArrayComponents
to code data
and use MatrixPlot
:
MatrixPlot[ArrayComponents[data],
ColorFunction -> "Rainbow", Frame -> False, AspectRatio -> 1/5,
ImageSize -> Length[data]]
BarChart[Values@Counts[data], ColorFunction -> "Rainbow",
BarSpacing -> 0, 0, Frame -> False, Axes -> False,
BarOrigin -> Left, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5, AspectRatio -> 1/10, ImageSize -> 500]
Use Log @ Values @ Counts[data]
as the first argument to get
Update: An alternative is to use ArrayComponents
to code data
and use MatrixPlot
:
MatrixPlot[ArrayComponents[data],
ColorFunction -> "Rainbow", Frame -> False, AspectRatio -> 1/5,
ImageSize -> Length[data]]
edited Aug 29 at 5:42
answered Aug 29 at 2:13
kglr
162k8185385
162k8185385
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.
â partida
Aug 29 at 2:25
@partida, thank you for the accept.Tooltip
is a great idea.
â kglr
Aug 29 at 2:25
I see there is a large white in the background, could you tell me how to delete it such asImageCrop
do? Thanks
â partida
Aug 29 at 2:26
@partida, in the updated version i usedPlotRange
to get rid of the white background.
â kglr
Aug 29 at 2:27
 |Â
show 1 more comment
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.
â partida
Aug 29 at 2:25
@partida, thank you for the accept.Tooltip
is a great idea.
â kglr
Aug 29 at 2:25
I see there is a large white in the background, could you tell me how to delete it such asImageCrop
do? Thanks
â partida
Aug 29 at 2:26
@partida, in the updated version i usedPlotRange
to get rid of the white background.
â kglr
Aug 29 at 2:27
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Wow It's really a neat example of BarChart
â partida
Aug 29 at 2:16
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.â partida
Aug 29 at 2:25
Tooltip[#[[2]], #[[1]]] & /@ Normal[Counts[data]]
may display more information such as label.â partida
Aug 29 at 2:25
@partida, thank you for the accept.
Tooltip
is a great idea.â kglr
Aug 29 at 2:25
@partida, thank you for the accept.
Tooltip
is a great idea.â kglr
Aug 29 at 2:25
I see there is a large white in the background, could you tell me how to delete it such as
ImageCrop
do? Thanksâ partida
Aug 29 at 2:26
I see there is a large white in the background, could you tell me how to delete it such as
ImageCrop
do? Thanksâ partida
Aug 29 at 2:26
@partida, in the updated version i used
PlotRange
to get rid of the white background.â kglr
Aug 29 at 2:27
@partida, in the updated version i used
PlotRange
to get rid of the white background.â kglr
Aug 29 at 2:27
 |Â
show 1 more comment
up vote
2
down vote
Counts@data
lose the order information.
But it may make the question more complicated.
Now the sequence of data is maintained, looks not beautiful.
BarChart[Tooltip[
Function[val, Style[val, ColorData["Rainbow", col[First@#]]]]
@Length@#, First@#] & /@ Split[data],
BarSpacing -> 0, 0, Frame -> False, Axes -> False, BarOrigin -> Left,
AspectRatio -> 1/10, ImageSize -> 500, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5]
add a comment |Â
up vote
2
down vote
Counts@data
lose the order information.
But it may make the question more complicated.
Now the sequence of data is maintained, looks not beautiful.
BarChart[Tooltip[
Function[val, Style[val, ColorData["Rainbow", col[First@#]]]]
@Length@#, First@#] & /@ Split[data],
BarSpacing -> 0, 0, Frame -> False, Axes -> False, BarOrigin -> Left,
AspectRatio -> 1/10, ImageSize -> 500, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5]
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Counts@data
lose the order information.
But it may make the question more complicated.
Now the sequence of data is maintained, looks not beautiful.
BarChart[Tooltip[
Function[val, Style[val, ColorData["Rainbow", col[First@#]]]]
@Length@#, First@#] & /@ Split[data],
BarSpacing -> 0, 0, Frame -> False, Axes -> False, BarOrigin -> Left,
AspectRatio -> 1/10, ImageSize -> 500, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5]
Counts@data
lose the order information.
But it may make the question more complicated.
Now the sequence of data is maintained, looks not beautiful.
BarChart[Tooltip[
Function[val, Style[val, ColorData["Rainbow", col[First@#]]]]
@Length@#, First@#] & /@ Split[data],
BarSpacing -> 0, 0, Frame -> False, Axes -> False, BarOrigin -> Left,
AspectRatio -> 1/10, ImageSize -> 500, ChartLayout -> "Stacked",
PlotRange -> All, .5, 1.5]
edited Aug 29 at 5:30
answered Aug 29 at 5:24
partida
3,5651234
3,5651234
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f180809%2fhow-to-visualize-a-list-of-sequence%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
WordCloud[data]
?â kglr
Aug 29 at 2:01
@kglr If so, it lose order information if using WordCloud or PieChart or something
â partida
Aug 29 at 2:04
Just wondering: Why did you include a link to the raw data given you posted the
Counts
data?â David G. Stork
Aug 29 at 3:58
@DavidG.Stork I post my solution in the following and using the original data so that the sequence of data is maintained.
â partida
Aug 29 at 5:25