Re: ListPlot3D equal distance between ticks
- To: mathgroup at smc.vnet.net
- Subject: [mg123218] Re: ListPlot3D equal distance between ticks
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Sun, 27 Nov 2011 04:12:51 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201111261008.FAA24021@smc.vnet.net>
data = {{64, 4, 886442}, {64, 8, 1185834}, {64, 16, 1413761}, {64, 32, 1898121}, {64, 64, 2399946}, {128, 4, 972785}, {128, 8, 1371712}, {128, 16, 1686386}, {128, 32, 2101359}, {128, 64, 2299103}, {128, 128, 2774413}, {256, 4, 1049274}, {256, 8, 1530701}, {256, 16, 1939484}, {256, 32, 2337994}, {256, 64, 2702634}, {256, 128, 2983199}, {256, 256, 2929728}, {512, 4, 1073619}, {512, 8, 1616539}, {512, 16, 2024052}, {512, 32, 2502566}, {512, 64, 2829915}, {512, 128, 3146670}, {512, 256, 3262064}, {512, 512, 2887220}, {1024, 4, 1086305}, {1024, 8, 1650442}, {1024, 16, 2121919}, {1024, 32, 2583900}, {1024, 64, 2942022}, {1024, 128, 3207567}, {1024, 256, 3282425}, {1024, 512, 3156755}, {1024, 1024, 2555417}, {2048, 4, 1073467}, {2048, 8, 1660245}, {2048, 16, 2100079}, {2048, 32, 2537572}, {2048, 64, 2875243}, {2048, 128, 3073723}, {2048, 256, 3104566}, {2048, 512, 2964345}, {2048, 1024, 2506901}, {2048, 2048, 1714511}, {4096, 4, 1033969}, {4096, 8, 1528609}, {4096, 16, 1890461}, {4096, 32, 2252783}, {4096, 64, 2491328}, {4096, 128, 2640815}, {4096, 256, 2635402}, {4096, 512, 2562866}, {4096, 1024, 2145756}, {4096, 2048, 1733719}, {4096, 4096, 1428083}, {8192, 4, 998199}, {8192, 8, 1386424}, {8192, 16, 1685432}, {8192, 32, 1971052}, {8192, 64, 2156951}, {8192, 128, 2262451}, {8192, 256, 2304342}, {8192, 512, 2258912}, {8192, 1024, 1940664}, {8192, 2048, 1631496}, {8192, 4096, 1596806}, {8192, 8192, 1445765}, {16384, 4, 978483}, {16384, 8, 1333778}, {16384, 16, 1606614}, {16384, 32, 1865958}, {16384, 64, 2033732}, {16384, 128, 2131524}, {16384, 256, 2175623}, {16384, 512, 2153382}, {16384, 1024, 1877695}, {16384, 2048, 1595343}, {16384, 4096, 1568972}, {16384, 8192, 1572797}, {16384, 16384, 1490747}, {32768, 64, 1610544}, {32768, 128, 1696389}, {32768, 256, 1722995}, {32768, 512, 1668664}, {32768, 1024, 1602488}, {32768, 2048, 1366884}, {32768, 4096, 1367506}, {32768, 8192, 1321937}, {32768, 16384, 1364166}, {65536, 64, 204449}, {65536, 128, 191577}, {65536, 256, 189472}, {65536, 512, 185264}, {65536, 1024, 185199}, {65536, 2048, 179748}, {65536, 4096, 181658}, {65536, 8192, 181922}, {65536, 16384, 181214}, {131072, 64, 115968}, {131072, 128, 113258}, {131072, 256, 113912}, {131072, 512, 114549}, {131072, 1024, 113049}, {131072, 2048, 112721}, {131072, 4096, 112474}, {131072, 8192, 113360}, {131072, 16384, 113072}, {262144, 64, 96775}, {262144, 128, 96559}, {262144, 256, 95376}, {262144, 512, 96565}, {262144, 1024, 95877}, {262144, 2048, 95397}, {262144, 4096, 95393}, {262144, 8192, 96221}, {262144, 16384, 96566}, {524288, 64, 88793}, {524288, 128, 88772}, {524288, 256, 88736}, {524288, 512, 88827}, {524288, 1024, 88946}, {524288, 2048, 88239}, {524288, 4096, 88660}, {524288, 8192, 88474}, {524288, 16384, 88666}, {1048576, 64, 85800}, {1048576, 128, 85825}, {1048576, 256, 85842}, {1048576, 512, 85808}, {1048576, 1024, 85763}, {1048576, 2048, 85723}, {1048576, 4096, 85651}, {1048576, 8192, 85784}, {1048576, 16384, 85697}}; data2 = {Log[2, #[[1]]], Log[2, #[[2]]], #[[3]]} & /@ data; ListPointPlot3D[data2, PlotStyle -> AbsolutePointSize[4], AxesLabel -> {"File size\n (KB)", "Record size\n (KB)", "Speed\t\n(KB/s)\t"}, ColorFunction -> Function[{x, y, z}, Hue[z]], Ticks -> {Table[{n, 2^n}, {n, 6, 20}], Table[{n, 2^n}, {n, 2, 14}], Table[n, {n, 500000, 3500000, 500000}]}, ImageSize -> 600, PlotRange -> {{5, 21}, {1, 15}, {0, 3600000}}] speed = Interpolation[N[data2] /. {x_, y_, z_} -> {{x, y}, z}, InterpolationOrder -> 1]; Plot3D[speed[f, r], {f, Min[data2[[All, 1]]], Max[data2[[All, 1]]]}, {r, Min[data2[[All, 2]]], Max[data2[[All, 2]]]}, AxesLabel -> {"File size\n (KB)", "Record size\n (KB)", "Speed\t\n(KB/s)\t"}, ColorFunction -> Function[{x, y, z}, Hue[z]], Ticks -> {Table[{n, 2^n}, {n, 6, 20}], Table[{n, 2^n}, {n, 2, 14}], Table[n, {n, 500000, 3500000, 500000}]}, ImageSize -> 600, PlotRange -> {{5, 21}, {1, 15}, {0, 3600000}}] Bob Hanlon On Sat, Nov 26, 2011 at 5:08 AM, Reuben Trapdoor <reubentrapdoor at gmail.com> wrote: > Greetings, > > I'm trying to create a ListPlot3D similiar to this plot: > http://ec2-46-51-156-184.eu-west-1.compute.amazonaws.com/plot.pdf > > The data I'm using for this looks like this: > > data={{64,4,886442},{64,8,1185834},{64,16,1413761},{64,32,1898121}, > {64,64,2399946}, > {128,4,972785},{128,8,1371712},{128,16,1686386},{128,32,2101359}, > {128,64,2299103},{128,128,2774413}, > {256,4,1049274},{256,8,1530701},{256,16,1939484},{256,32,2337994}, > {256,64,2702634},{256,128,2983199},{256,256,2929728}, > {512,4,1073619},{512,8,1616539},{512,16,2024052},{512,32,2502566}, > {512,64,2829915},{512,128,3146670},{512,256,3262064}, > {512,512,2887220}, > {1024,4,1086305},{1024,8,1650442},{1024,16,2121919},{1024,32,2583900}, > {1024,64,2942022},{1024,128,3207567},{1024,256,3282425}, > {1024,512,3156755},{1024,1024,2555417}, > {2048,4,1073467},{2048,8,1660245},{2048,16,2100079},{2048,32,2537572}, > {2048,64,2875243},{2048,128,3073723},{2048,256,3104566}, > {2048,512,2964345},{2048,1024,2506901},{2048,2048,1714511}, > {4096,4,1033969},{4096,8,1528609},{4096,16,1890461},{4096,32,2252783}, > {4096,64,2491328},{4096,128,2640815},{4096,256,2635402}, > {4096,512,2562866},{4096,1024,2145756},{4096,2048,1733719}, > {4096,4096,1428083}, > {8192,4,998199},{8192,8,1386424},{8192,16,1685432},{8192,32,1971052}, > {8192,64,2156951},{8192,128,2262451},{8192,256,2304342}, > {8192,512,2258912},{8192,1024,1940664},{8192,2048,1631496}, > {8192,4096,1596806},{8192,8192,1445765}, > {16384,4,978483},{16384,8,1333778},{16384,16,1606614}, > {16384,32,1865958},{16384,64,2033732},{16384,128,2131524}, > {16384,256,2175623},{16384,512,2153382},{16384,1024,1877695}, > {16384,2048,1595343},{16384,4096,1568972},{16384,8192,1572797}, > {16384,16384,1490747}, > {32768,64,1610544},{32768,128,1696389},{32768,256,1722995}, > {32768,512,1668664},{32768,1024,1602488},{32768,2048,1366884}, > {32768,4096,1367506},{32768,8192,1321937},{32768,16384,1364166}, > {65536,64,204449},{65536,128,191577},{65536,256,189472}, > {65536,512,185264},{65536,1024,185199},{65536,2048,179748}, > {65536,4096,181658},{65536,8192,181922},{65536,16384,181214}, > {131072,64,115968},{131072,128,113258},{131072,256,113912}, > {131072,512,114549},{131072,1024,113049},{131072,2048,112721}, > {131072,4096,112474},{131072,8192,113360},{131072,16384,113072}, > {262144,64,96775},{262144,128,96559},{262144,256,95376}, > {262144,512,96565},{262144,1024,95877},{262144,2048,95397}, > {262144,4096,95393},{262144,8192,96221},{262144,16384,96566}, > {524288,64,88793},{524288,128,88772},{524288,256,88736}, > {524288,512,88827},{524288,1024,88946},{524288,2048,88239}, > {524288,4096,88660},{524288,8192,88474},{524288,16384,88666}, > {1048576,64,85800},{1048576,128,85825},{1048576,256,85842}, > {1048576,512,85808},{1048576,1024,85763},{1048576,2048,85723}, > {1048576,4096,85651},{1048576,8192,85784},{1048576,16384,85697}}; > > And by using: > ListPointPlot3D[data,AxesLabel->{"File size (KB)","Record > size(KB)","Speed (KB/s)"},ColorFunction->Function[{x,y,z},Hue[z]], > Ticks- >>{{64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,5242= 88,1048576}, > {4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384}, > {500000,1000000,1500000,2000000,2500000,3000000,3500000}}] > > Result: http://ec2-46-51-156-184.eu-west-1.compute.amazonaws.com/plot2.pd= f > I get a plot that doesn't show all the data, due to the exponential > distance between each datapoint. All the data below x=131072 doesn't > show at all, there is just a grey flat area there. Furthermore the z > axis doesn't show any ticks at all. So I'm wondering if there is a way > I can make the distance between each of these ticks the same length, > as they would in excel. I havent been able to find a log axis version > of ListPlot3D for example. > > I also tried to change the data to look like this: > > data={{1,1,886442},{1,2,1185834},{1,3,1413761},{1,4,1898121}, > {1,5,2399946}, > {2,1,972785},{2,2,1371712},{2,3,1686386},{2,4,2101359},{2,5,2299103}, > {2,6,2774413}, > {3,1,1049274},{3,2,1530701},{3,3,1939484},{3,4,2337994},{3,5,2702634}, > {3,6,2983199},{3,7,2929728}, > {4,1,1073619},{4,2,1616539},{4,3,2024052},{4,4,2502566},{4,5,2829915}, > {4,6,3146670},{4,7,3262064},{4,8,2887220}, > {5,1,1086305},{5,2,1650442},{5,3,2121919},{5,4,2583900},{5,5,2942022}, > {5,6,3207567},{5,7,3282425},{5,8,3156755},{5,9,2555417}, > {6,1,1073467},{6,2,1660245},{6,3,2100079},{6,4,2537572},{6,5,2875243}, > {6,6,3073723},{6,7,3104566},{6,8,2964345},{6,9,2506901}, > {6,10,1714511}, > {7,1,1033969},{7,2,1528609},{7,3,1890461},{7,4,2252783},{7,5,2491328}, > {7,6,2640815},{7,7,2635402},{7,8,2562866},{7,9,2145756},{7,10,1733719}, > {7,11,1428083}, > {8,1,998199},{8,2,1386424},{8,3,1685432},{8,4,1971052},{8,5,2156951}, > {8,6,2262451},{8,7,2304342},{8,8,2258912},{8,9,1940664},{8,10,1631496}, > {8,11,1596806},{8,12,1445765}, > {9,1,978483},{9,2,1333778},{9,3,1606614},{9,4,1865958},{9,5,2033732}, > {9,6,2131524},{9,7,2175623},{9,8,2153382},{9,9,1877695},{9,10,1595343}, > {9,11,1568972},{9,12,1572797},{9,13,1490747}, > {10,1,0},{10,2,0},{10,3,0},{10,4,0},{10,5,1610544},{10,6,1696389}, > {10,7,1722995},{10,8,1668664},{10,9,1602488},{10,10,1366884}, > {10,11,1367506},{10,12,1321937},{10,13,1364166}, > {11,1,0},{11,2,0},{11,3,0},{11,4,0},{11,5,204449},{11,6,191577}, > {11,7,189472},{11,8,185264},{11,9,185199},{11,10,179748}, > {11,11,181658},{11,12,181922},{11,13,181214}, > {12,1,0},{12,2,0},{12,3,0},{12,4,0},{12,5,115968},{12,6,113258}, > {12,7,113912},{12,8,114549},{12,9,113049},{12,10,112721}, > {12,11,112474},{12,12,113360},{12,13,113072}, > {13,1,0},{13,2,0},{13,3,0},{13,4,0},{13,5,96775},{13,6,96559}, > {13,7,95376},{13,8,96565},{13,9,95877},{13,10,95397},{13,11,95393}, > {13,12,96221},{13,13,96566}, > {14,1,0},{14,2,0},{14,3,0},{14,4,0},{14,5,88793},{14,6,88772}, > {14,7,88736},{14,8,88827},{14,9,88946},{14,10,88239},{14,11,88660}, > {14,12,88474},{14,13,88666}, > {15,1,0},{15,2,0},{15,3,0},{15,4,0},{15,5,85800},{15,6,85825}, > {15,7,85842},{15,8,85808},{15,9,85763},{15,10,85723},{15,11,85651}, > {15,12,85784},{15,13,85697}}; > > And by using > ListPlot3D[data, AxesLabel -> {"File size (KB)", "Record size(KB)", > "Speed (KB/s)"}, ColorFunction -> Function[{x, y, z}, Hue[z]], > Ticks -> {{64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, > 65536, 131072, 262144, 524288, 1048576}, {4, 8, 16, 32, 64, 128, 256, > 512, 1024, 2048, 4096, 8192, 16384}, {500000, 1000000, 1500000, > 2000000, 2500000, 3000000, 3500000}}] > > Results: http://ec2-46-51-156-184.eu-west-1.compute.amazonaws.com/plot1.p= df > Which gives me a useable plot, however all the x and y axis ticks are > incorrect of course. Does anyone have a suggestion for solving this > problem? Note that I have to create more than 20 plots like this so > changing the data as little as possible would be best. > > Thanks in advance for any suggestions. >
- References:
- ListPlot3D equal distance between ticks
- From: Reuben Trapdoor <reubentrapdoor@gmail.com>
- ListPlot3D equal distance between ticks