計算機科学のブログ

知識を広げる データの可視化 データの集合、リスト、Table、Range、刻み値、Thermometer gauge

ハンズ・オン・スタートMathematica® -Wolfram言語™によるプログラミング (C・ヘイスティング(著)、K・ミショー(著)、M・モリソン(著)、ウルフラム・リサーチ(翻訳)、丸善出版)の第2部(知識を広げる)、第11章(データの可視化)の練習問題1、2、3、4、5、6、7、8、9、10の解答を求めてみる。

plot {1, 6, 10, 13, 15}

ListPlot[{1, 6, 10, 13, 15}]
Output
res1 = {{0, 0} {1, 1}, {2, 3}, {3, 6}, {5, 15}}
{{0, 0}, {2, 3}, {3, 6}, {5, 15}}
res2 = {{0, 3}, {1, 7}, {2, 10}, {3, 13}, {4, 15}, {5, 16}}
{{0, 3}, {1, 7}, {2, 10}, {3, 13}, {4, 15}, {5, 16}}
res1 = {{0, 0} {1, 1}, {2, 3}, {3, 6}, {5, 15}};
res2 = {{0, 3}, {1, 7}, {2, 10}, {3, 13}, {4, 15}, {5, 16}};
ListPlot[{res1, res2}]
Output
ListLinePlot[{res1, res2}]
Output
Manipulate[
    ListPlot[{{1, 1}, {2, i}, {3, 10}}, PlotRange -> {0, 20}],
    {i, 1, 15, 1}
    ]
Output
points17 = Table[i^3-i^2+1, {i, -50, 50}]
{-127499, -120049, -112895, -106031, -99451, -93149, -87119, -81355, -75851, -70601, 
 
>   -65599, -60839, -56315, -52021, -47951, -44099, -40459, -37025, -33791, -30751, 
 
>   -27899, -25229, -22735, -20411, -18251, -16249, -14399, -12695, -11131, -9701, 
 
>   -8399, -7219, -6155, -5201, -4351, -3599, -2939, -2365, -1871, -1451, -1099, -809, 
 
>   -575, -391, -251, -149, -79, -35, -11, -1, 1, 1, 5, 19, 49, 101, 181, 295, 449, 649, 
 
>   901, 1211, 1585, 2029, 2549, 3151, 3841, 4625, 5509, 6499, 7601, 8821, 10165, 11639, 
 
>   13249, 15001, 16901, 18955, 21169, 23549, 26101, 28831, 31745, 34849, 38149, 41651, 
 
>   45361, 49285, 53429, 57799, 62401, 67241, 72325, 77659, 83249, 89101, 95221, 101615, 
 
>   108289, 115249, 122501}
points17 = Table[i^3-i^2+1, {i, -50, 50}];
ListPlot[points17]
Output
points21 = Table[Cos[a] + Sin[b], {a, -10, 10}, {b, -10, 10}];
ListPointPlot3D[points21]
Output
ListPlot3D[points21]
Output
ListPlot3D[points21, Mesh -> None]
Output
points21 = Table[Cos[a] + Sin[b], {a, -10, 10, 0.1}, {b, -10, 10, 0.1}];
ListPointPlot3D[points21]
Output
ListPlot3D[points21]
Output
ListPlot3D[points21, Mesh -> None]
Output
Histogram[{1, 6, 10, 13, 15, 25}, 12]
Output
Histogram[{1, 6, 10, 13, 15, 25}, 1]
Output
Histogram[{1, 6, 10, 13, 15, 25}, 12]
Output
Histogram[{1, 6, 10, 13, 15, 25}, {{1,5,15,30}}]
Output
Manipulate[
    ThermometerGauge[6x, {0, 20}],
    {x, 1, 3, 0.1}
]
Output