_images/toyplot.png

Matrix Visualization

It is often useful to render a two-dimensional matrix as a regular grid, colored by the matrix values, as a way to look for patterns in data. To facilitate this, Toyplot provides toyplot.canvas.Canvas.matrix() and toyplot.matrix() functions. To demonstrate, let’s begin with a visualization of a matrix containing values from a normal distribution centered around 1.0:

import numpy
numpy.random.seed(1234)
matrix = numpy.random.normal(loc=1.0, size=(20, 20))
import toyplot
toyplot.matrix(matrix, label="A matrix");
A matrix01234567891011121314151617181901.471435-0.1909762.4327070.6873480.2794111.8871631.8595880.3634761.015696-1.2426852.1500361.9919461.953324-1.0212550.6659231.0021181.4054531.2890922.321158-0.54690610.7973540.3440311.1934211.5534392.3181520.5306951.675554-0.8170270.8168912.0589690.6021601.3374382.0475792.0459381.8637170.8779081.1247130.6772051.8416753.39096121.0762000.4335541.036142-1.0749781.2477920.1028430.8632051.0182891.7554141.2152691.841009-0.445810-0.4019730.8990820.4517580.8553801.3540200.9644871.5657382.54565930.0257640.9296551.3079690.7915012.033801-1.4004543.030604-0.1426311.2118831.7047210.2145651.4620601.7042281.5235080.0737463.0078431.226963-0.1526591.6319791.03951341.464392-2.5635172.3211061.1526311.1645300.5699041.7673691.9849201.2708362.3919861.0798420.600035-0.0278510.4152821.8165940.9180530.6552341.528288-0.0689890.48811951.2912051.5665341.5035921.2852961.4842882.3634820.2188950.5319822.224574-0.2811081.875476-0.7107150.5492351.7491640.7960670.8178251.680656-0.8184991.0470721.39484460.7515680.3822930.3171161.436258-0.7030131.3937110.5206760.7009841.6941031.6786301.2395561.1512271.8161272.8935341.6396330.037971-1.0852662.930247-0.7353492.21038471.7974350.6201891.7025620.1496542.1768120.4756641.7009081.9841880.8782723.3657691.4961431.7965950.5259790.9433042.3577970.195166-1.1236200.6664980.1132811.33419881.5367840.2561700.6797960.0838010.1403321.2259851.6287761.1864941.9524781.9881380.9273920.4493970.061847-0.2390721.1396830.7769813.1236921.122273-0.4094322.4229869-1.147855-0.3475331.3635650.9852482.272395-0.449567-0.1955240.4081370.585495-0.4257951.2093950.407114-0.4731160.1034192.1043520.5684500.8388631.8891571.288377-0.051539100.6804390.3800071.1569980.4285452.0576330.2085110.4753731.0718782.9107591.7879651.5130820.4535842.0439453.1077852.4599272.0154051.7491850.3244791.4402661.688972110.7233542.9245331.4112041.8907651.226363-1.0786180.6121140.9128932.1263861.2471121.1211721.2989840.8429010.259531-0.2476531.2494551.5810733.7638441.3993251.668488120.7242261.5004831.863065-0.051628-0.3920542.1539222.1819441.3913710.1189531.2950802.863801-0.712274-0.4070851.1267811.003760-0.2689940.1611571.5539210.4959570.211560132.5294011.2054551.3130131.8665211.2990712.0765411.3631772.8936800.5142471.3876741.0235580.3397700.6813150.2773381.1773871.9835131.0235051.5537771.3537690.724406140.5095160.625563-1.3975042.5410301.0630850.715559-0.2656012.7879800.6454910.8952391.3862541.8227750.3162102.0572031.0318802.3431820.9494600.635990-0.5533420.680702151.5270461.7111120.7824553.637791-0.7421380.9055652.4311841.5927581.170297-0.7517061.2885810.4574201.1716021.9828180.9746510.7124481.9244430.9387540.268967-0.022774161.9959931.9555581.7138411.1333710.1929620.6579892.9087801.1559231.7596530.5769941.1816731.2744931.0679120.9630170.8291991.2669732.3829970.9775391.1313951.434437171.2645341.5656581.5850840.825702-0.0713690.9515390.1547101.4151011.4255310.0192760.5721742.4985700.6398430.541760-0.3379680.9586131.8210483.0978012.2829331.270338182.0031402.0786741.3407530.8019253.4814582.385255-0.154601-0.2680691.607862-0.0800960.3887181.102035-0.4365741.2107170.103096-0.7243932.792339-0.3127131.5558770.318119192.5727430.8953482.8503980.6666501.1934640.5032552.032723-0.7398040.2441380.1188881.3938920.0499741.3325071.528944-0.1205211.0482641.061988-0.0275160.7616652.932178

By default, the matrix is rendered using a Color Brewer diverging “BlueRed” linear map, mapped to the minimum and maximum values in the matrix. Thus, dark blue represents the minimum value and dark red is the maximum value. If you hover the mouse over the cells in the matrix you can see their values with a popup.

You can also display an optional color scale that shows the mapping from matrix values to colors:

toyplot.matrix(matrix, label="A matrix", colorshow=True);
A matrix01234567891011121314151617181901.471435-0.1909762.4327070.6873480.2794111.8871631.8595880.3634761.015696-1.2426852.1500361.9919461.953324-1.0212550.6659231.0021181.4054531.2890922.321158-0.54690610.7973540.3440311.1934211.5534392.3181520.5306951.675554-0.8170270.8168912.0589690.6021601.3374382.0475792.0459381.8637170.8779081.1247130.6772051.8416753.39096121.0762000.4335541.036142-1.0749781.2477920.1028430.8632051.0182891.7554141.2152691.841009-0.445810-0.4019730.8990820.4517580.8553801.3540200.9644871.5657382.54565930.0257640.9296551.3079690.7915012.033801-1.4004543.030604-0.1426311.2118831.7047210.2145651.4620601.7042281.5235080.0737463.0078431.226963-0.1526591.6319791.03951341.464392-2.5635172.3211061.1526311.1645300.5699041.7673691.9849201.2708362.3919861.0798420.600035-0.0278510.4152821.8165940.9180530.6552341.528288-0.0689890.48811951.2912051.5665341.5035921.2852961.4842882.3634820.2188950.5319822.224574-0.2811081.875476-0.7107150.5492351.7491640.7960670.8178251.680656-0.8184991.0470721.39484460.7515680.3822930.3171161.436258-0.7030131.3937110.5206760.7009841.6941031.6786301.2395561.1512271.8161272.8935341.6396330.037971-1.0852662.930247-0.7353492.21038471.7974350.6201891.7025620.1496542.1768120.4756641.7009081.9841880.8782723.3657691.4961431.7965950.5259790.9433042.3577970.195166-1.1236200.6664980.1132811.33419881.5367840.2561700.6797960.0838010.1403321.2259851.6287761.1864941.9524781.9881380.9273920.4493970.061847-0.2390721.1396830.7769813.1236921.122273-0.4094322.4229869-1.147855-0.3475331.3635650.9852482.272395-0.449567-0.1955240.4081370.585495-0.4257951.2093950.407114-0.4731160.1034192.1043520.5684500.8388631.8891571.288377-0.051539100.6804390.3800071.1569980.4285452.0576330.2085110.4753731.0718782.9107591.7879651.5130820.4535842.0439453.1077852.4599272.0154051.7491850.3244791.4402661.688972110.7233542.9245331.4112041.8907651.226363-1.0786180.6121140.9128932.1263861.2471121.1211721.2989840.8429010.259531-0.2476531.2494551.5810733.7638441.3993251.668488120.7242261.5004831.863065-0.051628-0.3920542.1539222.1819441.3913710.1189531.2950802.863801-0.712274-0.4070851.1267811.003760-0.2689940.1611571.5539210.4959570.211560132.5294011.2054551.3130131.8665211.2990712.0765411.3631772.8936800.5142471.3876741.0235580.3397700.6813150.2773381.1773871.9835131.0235051.5537771.3537690.724406140.5095160.625563-1.3975042.5410301.0630850.715559-0.2656012.7879800.6454910.8952391.3862541.8227750.3162102.0572031.0318802.3431820.9494600.635990-0.5533420.680702151.5270461.7111120.7824553.637791-0.7421380.9055652.4311841.5927581.170297-0.7517061.2885810.4574201.1716021.9828180.9746510.7124481.9244430.9387540.268967-0.022774161.9959931.9555581.7138411.1333710.1929620.6579892.9087801.1559231.7596530.5769941.1816731.2744931.0679120.9630170.8291991.2669732.3829970.9775391.1313951.434437171.2645341.5656581.5850840.825702-0.0713690.9515390.1547101.4151011.4255310.0192760.5721742.4985700.6398430.541760-0.3379680.9586131.8210483.0978012.2829331.270338182.0031402.0786741.3407530.8019253.4814582.385255-0.154601-0.2680691.607862-0.0800960.3887181.102035-0.4365741.2107170.103096-0.7243932.792339-0.3127131.5558770.318119192.5727430.8953482.8503980.6666501.1934640.5032552.032723-0.7398040.2441380.1188881.3938920.0499741.3325071.528944-0.1205211.0482641.061988-0.0275160.7616652.932178-2024

Note that, because our minimum and maximum data values aren’t symmetric around the origin, the white section of the color map doesn’t map to zero, and some values greater than zero are mapped to the cool blue portion of the spectrum. Let’s fix this and force our our colormap to be symmetric around zero so all blue colors are negative and all red colors are positive. To do so, we simply create a custom toyplot.color.LinearMap, specifying explicit minimum and maximum domain values and using it in the call to create the matrix visualization:

colormap = toyplot.color.brewer.map("BlueRed", domain_min=-4, domain_max=4)
toyplot.matrix((matrix, colormap), label="A matrix", colorshow=True);
A matrix01234567891011121314151617181901.471435-0.1909762.4327070.6873480.2794111.8871631.8595880.3634761.015696-1.2426852.1500361.9919461.953324-1.0212550.6659231.0021181.4054531.2890922.321158-0.54690610.7973540.3440311.1934211.5534392.3181520.5306951.675554-0.8170270.8168912.0589690.6021601.3374382.0475792.0459381.8637170.8779081.1247130.6772051.8416753.39096121.0762000.4335541.036142-1.0749781.2477920.1028430.8632051.0182891.7554141.2152691.841009-0.445810-0.4019730.8990820.4517580.8553801.3540200.9644871.5657382.54565930.0257640.9296551.3079690.7915012.033801-1.4004543.030604-0.1426311.2118831.7047210.2145651.4620601.7042281.5235080.0737463.0078431.226963-0.1526591.6319791.03951341.464392-2.5635172.3211061.1526311.1645300.5699041.7673691.9849201.2708362.3919861.0798420.600035-0.0278510.4152821.8165940.9180530.6552341.528288-0.0689890.48811951.2912051.5665341.5035921.2852961.4842882.3634820.2188950.5319822.224574-0.2811081.875476-0.7107150.5492351.7491640.7960670.8178251.680656-0.8184991.0470721.39484460.7515680.3822930.3171161.436258-0.7030131.3937110.5206760.7009841.6941031.6786301.2395561.1512271.8161272.8935341.6396330.037971-1.0852662.930247-0.7353492.21038471.7974350.6201891.7025620.1496542.1768120.4756641.7009081.9841880.8782723.3657691.4961431.7965950.5259790.9433042.3577970.195166-1.1236200.6664980.1132811.33419881.5367840.2561700.6797960.0838010.1403321.2259851.6287761.1864941.9524781.9881380.9273920.4493970.061847-0.2390721.1396830.7769813.1236921.122273-0.4094322.4229869-1.147855-0.3475331.3635650.9852482.272395-0.449567-0.1955240.4081370.585495-0.4257951.2093950.407114-0.4731160.1034192.1043520.5684500.8388631.8891571.288377-0.051539100.6804390.3800071.1569980.4285452.0576330.2085110.4753731.0718782.9107591.7879651.5130820.4535842.0439453.1077852.4599272.0154051.7491850.3244791.4402661.688972110.7233542.9245331.4112041.8907651.226363-1.0786180.6121140.9128932.1263861.2471121.1211721.2989840.8429010.259531-0.2476531.2494551.5810733.7638441.3993251.668488120.7242261.5004831.863065-0.051628-0.3920542.1539222.1819441.3913710.1189531.2950802.863801-0.712274-0.4070851.1267811.003760-0.2689940.1611571.5539210.4959570.211560132.5294011.2054551.3130131.8665211.2990712.0765411.3631772.8936800.5142471.3876741.0235580.3397700.6813150.2773381.1773871.9835131.0235051.5537771.3537690.724406140.5095160.625563-1.3975042.5410301.0630850.715559-0.2656012.7879800.6454910.8952391.3862541.8227750.3162102.0572031.0318802.3431820.9494600.635990-0.5533420.680702151.5270461.7111120.7824553.637791-0.7421380.9055652.4311841.5927581.170297-0.7517061.2885810.4574201.1716021.9828180.9746510.7124481.9244430.9387540.268967-0.022774161.9959931.9555581.7138411.1333710.1929620.6579892.9087801.1559231.7596530.5769941.1816731.2744931.0679120.9630170.8291991.2669732.3829970.9775391.1313951.434437171.2645341.5656581.5850840.825702-0.0713690.9515390.1547101.4151011.4255310.0192760.5721742.4985700.6398430.541760-0.3379680.9586131.8210483.0978012.2829331.270338182.0031402.0786741.3407530.8019253.4814582.385255-0.154601-0.2680691.607862-0.0800960.3887181.102035-0.4365741.2107170.103096-0.7243932.792339-0.3127131.5558770.318119192.5727430.8953482.8503980.6666501.1934640.5032552.032723-0.7398040.2441380.1188881.3938920.0499741.3325071.528944-0.1205211.0482641.061988-0.0275160.7616652.932178-4-2024

Now we see that the color map is nicely symmetric around the origin, making it clear which values are positive and which are negative.

In addition to the top-level label, you can specify labels on any side of the matrix. Note the convention in the parameter names: t for “top”, l for “left”, r for “right”, and b for “bottom”:

toyplot.matrix((matrix, colormap), label="A matrix", tlabel="Top", llabel="Left", rlabel="Right", blabel="Bottom");
A matrix01234567891011121314151617181901.471435-0.1909762.4327070.6873480.2794111.8871631.8595880.3634761.015696-1.2426852.1500361.9919461.953324-1.0212550.6659231.0021181.4054531.2890922.321158-0.54690610.7973540.3440311.1934211.5534392.3181520.5306951.675554-0.8170270.8168912.0589690.6021601.3374382.0475792.0459381.8637170.8779081.1247130.6772051.8416753.39096121.0762000.4335541.036142-1.0749781.2477920.1028430.8632051.0182891.7554141.2152691.841009-0.445810-0.4019730.8990820.4517580.8553801.3540200.9644871.5657382.54565930.0257640.9296551.3079690.7915012.033801-1.4004543.030604-0.1426311.2118831.7047210.2145651.4620601.7042281.5235080.0737463.0078431.226963-0.1526591.6319791.03951341.464392-2.5635172.3211061.1526311.1645300.5699041.7673691.9849201.2708362.3919861.0798420.600035-0.0278510.4152821.8165940.9180530.6552341.528288-0.0689890.48811951.2912051.5665341.5035921.2852961.4842882.3634820.2188950.5319822.224574-0.2811081.875476-0.7107150.5492351.7491640.7960670.8178251.680656-0.8184991.0470721.39484460.7515680.3822930.3171161.436258-0.7030131.3937110.5206760.7009841.6941031.6786301.2395561.1512271.8161272.8935341.6396330.037971-1.0852662.930247-0.7353492.21038471.7974350.6201891.7025620.1496542.1768120.4756641.7009081.9841880.8782723.3657691.4961431.7965950.5259790.9433042.3577970.195166-1.1236200.6664980.1132811.33419881.5367840.2561700.6797960.0838010.1403321.2259851.6287761.1864941.9524781.9881380.9273920.4493970.061847-0.2390721.1396830.7769813.1236921.122273-0.4094322.4229869-1.147855-0.3475331.3635650.9852482.272395-0.449567-0.1955240.4081370.585495-0.4257951.2093950.407114-0.4731160.1034192.1043520.5684500.8388631.8891571.288377-0.051539100.6804390.3800071.1569980.4285452.0576330.2085110.4753731.0718782.9107591.7879651.5130820.4535842.0439453.1077852.4599272.0154051.7491850.3244791.4402661.688972110.7233542.9245331.4112041.8907651.226363-1.0786180.6121140.9128932.1263861.2471121.1211721.2989840.8429010.259531-0.2476531.2494551.5810733.7638441.3993251.668488120.7242261.5004831.863065-0.051628-0.3920542.1539222.1819441.3913710.1189531.2950802.863801-0.712274-0.4070851.1267811.003760-0.2689940.1611571.5539210.4959570.211560132.5294011.2054551.3130131.8665211.2990712.0765411.3631772.8936800.5142471.3876741.0235580.3397700.6813150.2773381.1773871.9835131.0235051.5537771.3537690.724406140.5095160.625563-1.3975042.5410301.0630850.715559-0.2656012.7879800.6454910.8952391.3862541.8227750.3162102.0572031.0318802.3431820.9494600.635990-0.5533420.680702151.5270461.7111120.7824553.637791-0.7421380.9055652.4311841.5927581.170297-0.7517061.2885810.4574201.1716021.9828180.9746510.7124481.9244430.9387540.268967-0.022774161.9959931.9555581.7138411.1333710.1929620.6579892.9087801.1559231.7596530.5769941.1816731.2744931.0679120.9630170.8291991.2669732.3829970.9775391.1313951.434437171.2645341.5656581.5850840.825702-0.0713690.9515390.1547101.4151011.4255310.0192760.5721742.4985700.6398430.541760-0.3379680.9586131.8210483.0978012.2829331.270338182.0031402.0786741.3407530.8019253.4814582.385255-0.154601-0.2680691.607862-0.0800960.3887181.102035-0.4365741.2107170.103096-0.7243932.792339-0.3127131.5558770.318119192.5727430.8953482.8503980.6666501.1934640.5032552.032723-0.7398040.2441380.1188881.3938920.0499741.3325071.528944-0.1205211.0482641.061988-0.0275160.7616652.932178TopLeftRightBottom

Note that by default, Toyplot provides row and column indices for the matrix, along the top and left sides. As your matrix sizes grow, you may need to thin-out the indices to avoid overlap:

big_matrix = numpy.random.normal(loc=1, size=(50, 50))
toyplot.matrix((big_matrix, colormap), step=5, label="A matrix");
A matrix05101520253035404500.7733680.0761691.355839-0.2700630.8045280.5365811.9894152.3886472.0877141.4388010.0383982.2456101.5029260.3686010.2957480.7595171.5855991.352801-0.8155580.0898760.2514720.8918751.2747791.2373500.7401560.6875581.4485100.9404680.5299851.349567-0.0274690.6933622.406176-0.249697-0.5601492.5573980.4066440.8297112.6726270.4592000.3158721.5999620.7828011.3315270.6166350.2181841.2662371.279428-0.2196260.276051-0.7347781.2716611.0991120.6369100.4117731.0259420.4276982.105587-0.208016-0.3397013.075185-0.489410-0.1509531.4190601.4134051.7175771.2617250.7572290.4987320.3018712.3845800.7135751.5000702.9511030.7216331.0367861.445853-0.4103511.4500011.515480-0.154084-0.3801730.5041670.586721-0.7193170.9704390.2339601.0998820.286976-1.2261181.7257141.9169760.436110-0.5221800.9857210.7532790.8346711.119114-1.074980-0.0027551.5235461.8215170.8512580.9546300.2955072.7303161.2289272.0927410.6464280.9693410.7998280.5186902.7114262.435387-0.1675201.0408431.3620181.5725922.1044600.5743281.7556891.0102811.224586-0.1347080.0484790.8728701.0289443.1040772.5675140.3757700.599356-0.1370620.096841-0.0972780.928691-0.3193390.4399071.1649550.3684140.132930-0.0025632.2073482.7119870.3754110.787854-0.1935641.6575861.2000802.0912600.5109782.3682201.8916251.8375661.5141450.9499501.743953-0.7240501.0899021.3227400.6228510.9997792.0501140.8313011.7978761.552524-0.1530932.641552-0.4389783.027740-0.3653171.0721491.6131522.4891661.221297-0.5308921.8018880.5755332.1188552.5695482.427732-0.3718380.7335821.7792150.8971860.4135351.2402530.0019441.1911700.0471972.4709971.7189050.8334401.764611-0.1894430.4651430.978402-0.105192-0.0559462.0213562.7096561.0295621.1238421.2894300.6985081.4144351.9498581.521849-0.9692631.5028100.6455780.553010-0.1169780.2117342.055752-0.3045411.5397351.3469911.874193-0.5751790.8400160.3566670.2846292.6994592.2828370.5474421.3938001.4257410.8699530.6062670.3589401.1719640.1598511.8649980.7951390.8929270.7578930.0975171.7978710.7109041.6769780.6568161.4872101.765665-1.200564-1.5960621.475675-0.594886-0.1100770.001594-1.27580752.552807-0.1492991.1885311.988964-0.5861360.5276190.8111541.2111272.6117221.5667300.3588232.5387741.3096640.5511512.7691011.268200-0.4622252.8508102.7007701.3533911.3364892.0571052.198679-1.5946540.2852551.8043462.1916550.872635-0.0749752.4482690.721646-0.0368191.2014511.5017562.613335-0.8977112.2990831.5531840.7996381.5456701.2622871.2190701.9323532.7430520.8752961.9540321.7120510.4206630.2381812.6615023.5476920.9610880.643591-0.8625693.6519990.8637701.1037491.1154321.2586702.4877432.4543431.7043082.4663511.353622-0.0855231.363210-0.8132770.8020891.4328750.4594341.2956313.079844-0.8424330.4888340.4190652.0627361.0180551.022798-0.6797911.8124230.374111-0.2502711.6151350.878605-0.2808951.3246101.6705691.1491611.3270640.6470380.0944722.6761851.6809960.2962821.1020802.1950560.7220410.9478351.3536840.591689-0.8104300.0966922.0540450.0191231.3520791.6659822.0655020.7715661.364484-0.5148470.9247390.7029420.2725860.7541250.8720510.630689-1.6230043.1158511.6855620.8425562.3812881.0684271.3125361.4542530.2115280.934160-0.4184800.8602470.4446450.4980821.6931190.754640-0.2694320.7376763.3375980.2182831.080100-0.3394111.4134511.2044521.4784531.0295810.8175581.0174673.054290-1.5318831.4238150.0443160.866326-0.0774032.2499031.5711491.2970481.8718650.8362891.6895232.9845900.8817181.955130-0.1805532.4704740.9784421.7108610.188165-1.251213-0.1261000.6921330.0381151.6708261.0633830.3432040.7116370.7802071.2002480.1545003.6429230.6662550.8544921.8933692.2885551.3311980.9246320.9388522.8560570.2469590.6597740.4490040.3959633.1225901.0203060.1337400.6441120.0456582.5914641.0005870.535968-0.5237111.1548700.1593511.0106860.4562601.6754550.0266581.8183480.8839830.3091422.0389551.9812721.6166210.2125131.0208571.5993400.6218050.9445312.9834881.0778881.4045840.1509900.9219100.4726880.7573122.1069500.9644700.0400850.3710491.2685151.4883611.5868390.8246070.5665741.043672-1.368893-0.592721-1.4416710.7372660.1773820.9577320.6087301.2305801.3285641.8380490.0921180.958254-0.9943361.1081640.4107140.015020-0.0361773.0396860.341243100.3920161.8664530.258531-0.4705611.7084740.8714880.8393602.0771700.3866030.2882361.0654390.5785290.6587832.312037-0.8229321.2153760.3292871.2597171.4695491.4922331.512171-0.1420200.8851062.2659750.0707701.1909152.0015560.902579-1.119597-1.1969222.1222683.0118421.3020110.5103380.486451-0.0739213.2035150.7011722.3460981.6268200.934189-0.8438651.1099733.0065610.2421492.015998-0.5924931.2923672.3370320.7567460.7689760.6610711.3186162.3970390.1201871.1118201.4315682.6137850.7026152.6389621.1340971.172037-0.3650170.5787341.880640-0.4725671.7577100.3633950.9841620.6121851.8896632.1341572.7316300.294480-0.2858100.3617901.7007851.8811410.346796-0.3199660.1812871.1627021.6697600.4259201.7436871.6167131.9718670.2880960.2643070.0365361.4591381.6562381.751503-0.8721840.4437201.2721641.9315461.3275321.7408140.198095-0.582208-0.6201901.046562-0.6798292.3958920.1550291.8140070.9502581.5342470.1929911.8416410.4418270.3708432.1776670.1549190.7185612.719957-0.077500-0.3782820.7048562.6288560.6225621.0267580.077762-0.4167571.8635280.795594-1.1098400.4739161.052376-0.7441941.0552191.4334730.9499410.3494881.897314-0.3712611.2529580.5119881.637370-0.889504-0.7218510.5097561.8762310.5013931.6836031.3677242.0722991.0365801.1602242.3054872.282103-0.3244251.2205221.1645572.6594670.0271510.2510951.7648091.0066201.1917001.029017-0.889223-0.5861751.7582501.2380231.0878330.2496731.4801030.2412870.6503591.0271350.3926351.0474791.2265370.7714750.3606741.969798-0.088442-1.1789201.0537770.7806620.3936331.6947050.830573-1.530858-1.0969861.0236901.2826840.2078470.6350450.5827150.6747941.3153591.0219952.1081601.3429690.7561242.8415100.5417192.571396-0.4059071.0072652.8300121.6478541.5065932.6306593.2290050.6334401.0679110.7143381.2499710.5957120.0033980.1896010.2895860.1474413.7103621.0309510.0942690.907970-0.4114060.7207131.8588501.9894190.7804551.2889892.5663333.444560-0.2869182.1785050.6397022.8724200.5685262.4018422.2408452.069111-0.0900761.0514780.1094101.9995921.778719-0.2400270.2234910.0932621.4323270.5824030.9745760.2622991.650904151.4583421.567962-0.1106530.5657561.835327-0.9085231.4474740.4432991.295618-0.9895431.8795341.2990690.8709681.0381541.6854481.3478280.1658771.885075-0.0680981.0215282.5716611.8839560.8319050.2600792.3937631.0612170.9361570.0678982.2921183.4181411.344858-0.2546743.3889141.6686241.2327980.5364960.8140340.7641690.7643702.4915330.003828-0.4390310.3296821.5523351.002698-0.1353401.060521-1.120442-1.1922940.8883990.5213260.581075-0.7827763.0209941.6523780.1421102.8745862.5929463.295964-0.2101322.4580110.8393011.2010931.3861771.3818300.348081-0.4876612.5167180.7708811.1639202.4965290.4007500.2398310.9297430.8557371.1930980.9963341.764705-0.0285510.5754031.7629211.5151203.577900-0.0635491.1837120.6997730.1468312.1204381.1203122.2025880.5900911.4341981.597371-0.6114020.5942501.385086-1.0196520.087703-0.3192151.0505713.5255291.578073-0.1266080.8249730.9105141.5019651.3577870.123323-0.5200621.5448111.8925590.3785070.9212410.8424191.1898731.8191020.3263452.181818-0.511219-0.4378482.7074140.3890230.3083720.4508731.7066010.1071552.2091361.5397850.5255101.3818650.7889970.6421631.9601062.9298750.882717-0.0439273.3048651.7401410.7188292.0973781.8750880.1805101.6297981.6380990.8723711.5726911.3412063.105784-0.770872-0.5677172.0406990.6104323.4786810.1482551.175091-0.2411381.6143584.1256351.6543703.0953452.0477110.339269-0.9789952.5102551.5719100.766056-0.3838601.7394482.4089723.1183331.580307-0.1070420.8362341.5067430.9714110.4943720.9986870.2386180.5121851.2211240.984714-0.5690140.6319154.1096350.3767931.9777181.1533070.0183750.6398992.4951671.1817090.2324510.6591421.3724091.3059222.4395551.2860173.1038830.3463701.7783530.3171691.0469100.2559001.3107400.7175102.587269-0.0138022.3736541.6579781.5557340.5696901.0933200.7100550.4134621.1237680.3456831.9377871.8392410.3326691.3419140.0023600.1064413.364698-0.8614240.3640290.3076950.814741-0.8974211.5807171.0269151.7165081.615566-0.090433-0.5082892.1333792.0229340.6786470.4615410.9161770.6025280.6807091.9485340.4603020.7036640.9280332.3990511.7188060.1363290.9532810.249165200.3648450.318980-0.5015860.6310750.6470011.1273841.5175311.7478370.1906220.3673140.5533450.3130801.2093101.4803081.1385170.2099000.6141501.5576661.3433471.0673440.3841950.0893973.1710430.9494452.5523521.7961560.454831-0.8707030.437635-0.7835951.0706340.5254631.252306-0.1109250.9101960.1634510.5855931.8533091.6142270.761433-0.0552881.4334352.7641192.1976460.0511320.531348-0.2601912.5802850.4443071.6498151.8379682.8300091.269306-0.8487560.2501950.7322671.6312700.9128570.9307510.8321771.6494991.6204351.1444082.160046-0.0543721.2647780.3253852.3208730.0400950.1925690.6717771.9170880.6832321.9228130.1070232.9350441.9198612.066228-0.941028-0.4080262.6725062.1357761.3443230.352906-0.027926-0.8707841.661100-0.8046332.1655361.6638581.1560781.4136142.2111160.8238791.9424381.6334360.8861201.4579970.3844391.3852861.2914950.7758412.0892702.0113882.124646-0.8708441.1757390.2234140.696135-0.2404020.4924280.645523-0.0460101.3936730.6543522.3131702.6083190.7807910.6515191.3013500.7747030.3375661.9117142.1908240.8903010.6416621.5703101.3916861.4101691.707859-0.1007972.5648501.5622430.2626370.4109771.4579471.0052720.8790200.6466452.5530441.0751311.9958230.8770532.0002190.5890131.1722561.8440842.1763471.5384641.4719651.0125641.0926330.5044130.0313491.2969830.9983202.0297063.0892540.809142-0.5846593.511215-0.239234-0.2236680.6647711.4599300.3594462.7625680.9143272.6361780.455892-0.0499991.254617-0.7501231.5513422.4128622.321717-1.1444522.0237221.8239230.365007-1.2183810.0324941.6047652.9296710.1763591.3120290.2149261.7400890.563660-0.3852220.9450480.2411610.3366430.7686081.3131501.4105881.9631782.214784-0.3010822.5970010.2632761.705918-0.0316392.0913471.4955702.3264801.8411501.0924092.0899413.0696231.9581880.5070980.1799800.014196-0.6052822.4879431.908157-1.4240031.3341261.4752201.2057201.2128302.9680233.071340-0.1554080.1378860.1785180.3320060.6318251.0201190.1767920.8345191.7208662.2959190.4722330.5366070.849208-0.1393410.0456131.0518370.8529520.6160222.2090251.2139230.8860201.9449450.8166072.7143231.0246001.454133251.2722781.3058230.6095871.4241651.2085131.4293862.3576970.8343880.9590942.836982-1.0803220.9618700.3344850.7943201.705880-1.6127910.9747060.8217340.935362-0.204956-2.8808981.9744701.4151602.7519671.4850110.8291061.7488701.6297931.8110533.1337761.2384592.798873-0.6046481.1187151.7622382.8364310.4410260.8166790.0109501.7750320.4066722.208619-0.588639-0.2366602.2738041.0616411.388053-0.8607710.2182920.6312632.1376770.8826791.7749451.1811070.0838901.3950830.8175080.2096922.2310650.7242541.0685521.9110621.2067040.303506-0.9544900.6366200.0216741.8773320.587610-1.1315222.403688-0.4794250.4558580.6081130.7312412.0344000.2836861.373861-0.3252182.2768332.0410671.1194440.9548911.3387290.7857920.2753181.0316821.6768151.4483061.3542272.7967620.3157060.1910590.3760841.0840442.3280160.5247480.8897041.3659870.297568-0.203936-0.0768530.0920531.956434-0.3450170.1393920.1327751.3233160.178800-1.1218922.1997860.5840661.2486721.4077342.1547171.6742820.0363681.6982001.1284450.7372111.2711320.759561-0.4621582.0220491.749334-0.0897602.2103992.7304250.0158241.4426020.8282231.9526950.9230771.7988640.1051321.306630-0.186454-0.5553320.8384662.8177271.0233612.0830200.9542121.2997501.6667521.032851-1.3340471.277205-0.7120973.1881391.6716661.1433551.3457841.9945341.7016671.6282180.9492050.8349120.8116020.907897-0.2441831.4873271.7059271.8893862.0075650.0124570.1025681.3704730.8218930.6021211.7674442.6782101.6585001.382663-0.098943-0.109420-0.3949062.1786200.4711981.6800762.2524041.670394-0.5397212.1887470.680183-0.2572091.4051211.4309172.2428780.2444431.3936330.0913482.4997580.6375090.378049-0.114230-0.8674801.0588390.3649520.7251681.4366730.5813531.0411540.1912370.9559531.2814330.0603172.9809102.4525381.2693541.287561-0.171541-0.1604661.2368780.2443210.3715361.608779-0.6700842.4561391.4052312.7321130.0639900.6162931.8289510.2336853.0357031.0444720.3471450.3201950.1271270.350406-0.0798430.8930761.5859863.2171381.8986443.5507841.1648581.1949460.1961120.6352461.1551450.7521430.3823161.7111631.1502630.7591730.1410131.7650421.672174301.0276940.772201-0.9200560.8144660.8511512.2420062.0295741.3960240.1137171.4292361.6919931.2426942.5240331.3039210.8879510.7031621.1485901.7650401.7791282.4702801.1734581.1066710.1816361.6716491.0873421.8764690.7335363.1534412.2493521.2420060.1672713.454219-0.2926591.3530560.9021731.4911210.4847152.0320580.695333-0.2397970.5649910.4277060.6522370.353043-0.0601291.4011980.1964660.6753511.7006001.7654900.4922270.9755051.7607472.3812411.384539-0.0743451.3001551.5132620.4576181.0786240.5150000.9135442.3157101.208128-0.4018510.1755311.2004170.8715831.4484282.2112081.5934361.647215-0.0819790.9544811.3113160.145772-1.5694581.1447420.7038650.6708322.1085491.322386-0.9559771.3712840.2962231.5566222.9570041.8410301.5625521.4423170.7349282.2222521.166502-0.2434291.3485791.6325793.0133821.7814633.1471520.091649-0.1870412.6170820.9573191.3679842.8091852.0200682.5897212.2381170.0234760.1122500.4226741.8029551.760488-0.585657-0.6914152.0547370.4980070.7053130.4986120.3679971.1059371.5808870.972431-1.467703-0.1261650.7308120.4170331.3126161.3946901.3157260.080757-1.2471560.7065213.0536831.5294051.4286600.4925501.5305791.3261880.4051041.4269220.9352010.6926592.0124731.3382691.7460891.1797730.0826271.2561081.0847890.615494-0.2972422.148495-2.277304-0.3639462.5646870.2071831.3454762.6682191.6787512.1642260.5532351.5981281.192059-1.1469260.1147730.505608-0.024987-0.8928350.6886110.8813331.8333550.0711552.5812530.2801241.6712382.1212932.1710971.1384322.0452120.6567110.1580830.3906530.8404860.3535410.7723090.5737621.3776501.1411580.9649060.1103560.2532351.6126043.0803202.4988650.806225-0.3566232.332053-0.2062110.5325882.155392-0.4819181.8206041.0730511.3134312.818929-0.2539672.5583851.9608920.0643090.8212920.7312331.3020251.615806-0.3008901.0181041.1642882.3330503.6039181.3970130.5223300.8965861.2300210.1322910.8755160.2387571.3244231.340493-0.1394990.6376470.3874220.9395122.092638-1.0460931.4190312.0996861.2186570.151767-0.656613-0.0246102.3352261.8506582.2950281.0502981.3495471.0872751.8187100.5251240.4312441.058626350.5108930.6431270.5629290.7564660.9062220.3840171.4146491.2020960.7024391.6816611.5383110.3859491.7690583.0632422.5247191.389534-0.4419411.8456720.554687-0.4922661.2117850.6328170.025948-0.341869-0.5496321.3135350.596445-0.0741800.9985882.0977131.872332-0.7551801.795485-1.0075312.1861341.6285610.9421582.8559021.0284840.8185661.6123990.2366760.6450380.7382241.8121261.4826150.1134880.9622430.4370471.8977061.383232-0.3248062.1392690.9445191.5337851.4907331.9728231.8069091.3175461.0514780.0278831.1598361.765861-0.7338630.7005072.908761-0.2121210.8777181.2260621.424852-0.3029611.2448671.6790172.660738-1.0312700.5646700.1201641.1288321.0553412.4720331.525388-0.1109560.8104341.8256403.4702421.3110870.4162811.5805091.8326130.4617691.2613261.4573320.790342-0.7331991.5765541.073786-0.6025571.547602-0.9683220.7804450.7506651.9983150.9421720.0150990.9655231.3805861.4745050.4444960.6070660.4387020.7480261.566106-0.0537680.6410681.6532920.9306332.1199342.8416471.3047810.1809681.8758940.8271942.2498400.0776930.8693102.3045471.6046920.7679561.1815851.4639230.7954832.4628241.506149-0.9868851.5610831.3431160.9661470.9384440.2887964.2205680.8798881.3429582.8102501.6107870.6264420.9977101.4767211.6181530.765184-1.1013050.512504-1.3027431.9348492.367166-0.1805750.709087-0.9392871.6287050.7774481.2231081.0516491.4991670.1887520.6006541.5149780.9130791.5601570.8464231.2275892.3023040.8568871.6146500.9579141.789137-0.8173630.4189421.3698050.5660872.2070472.456715-0.5426861.7780652.0058631.5131521.7741162.3002891.9135601.4568162.1523891.7415003.1620581.5179102.7897671.3750400.9240310.3219971.6005411.4934771.3938540.0935911.3191510.5008560.3396011.0774701.3875521.9763530.1587010.8540641.8548230.7144591.0538420.396418-0.1603750.187902-0.1958491.5625160.7631330.780326-0.6233220.3656041.3408773.8336830.9237300.0017540.5650980.1706991.8410791.2700512.6127061.5681963.6078410.8934263.0178290.1597420.9138360.2137311.5884880.6534020.465684-0.0890141.2917691.2538020.4193130.786949-0.6868110.1429270.1988382.3862270.4834340.809592402.446356-1.098420-0.1698590.581206-1.9445730.9014460.7192181.7398512.6271821.0301320.8543991.2275302.0488562.7739392.1168872.0812512.5094160.5013060.0868450.8730551.0796862.0203450.209890-0.1554470.6324952.2639141.8270490.4275312.2116782.7929882.3791253.0499171.9920110.0699650.750606-0.002895-1.5727070.9539202.3591821.0209710.7895272.5972611.9261910.8634572.168163-0.0062450.3832411.2189401.7178381.0133332.3480601.662176-0.050645-0.0348700.7567580.246634-0.454329-0.0229200.5230111.199096-0.0610831.8178402.5507952.2257682.5225411.1374871.4484781.952170-0.1150691.6514120.8078981.3376231.0475442.4715791.4769313.0102091.1358240.1718680.0246542.2497011.9775510.4441800.8326462.8106481.7462352.477640-0.4366501.9548723.1168541.3686001.4316701.8821430.973787-0.941880-0.1068250.3321651.2107120.4698050.7048090.8272781.6384542.8076222.0089001.6728221.7706582.5330021.5763210.180219-0.3020522.5994771.6768752.3240621.3108131.5044872.260332-0.2584682.1810682.2329530.9930721.3674491.6521861.2471312.5432642.3267891.6113160.3170980.0795891.9389841.2814482.1621630.9648990.1743850.6908400.7478431.7808441.3440652.2752472.3037632.8170051.4655890.013795-0.719758-1.2300790.560894-1.3972421.1245082.4939950.762942-0.4820141.4298890.2178141.3896660.519694-0.0519030.0122640.8179400.6205331.2732480.8614441.8819040.4851030.8822040.891094-0.142649-0.3491201.3168800.871155-0.3526441.1614581.7390641.165377-0.495080-0.7136393.0505991.7721673.2712430.0261641.4741690.3719791.5812381.2419880.8590760.3467452.7358561.4932231.6997610.5097851.2962811.5747740.4948401.7025480.4454151.728336-0.243858-0.1078220.573302-1.755651-0.148347-0.2346770.410550-0.3132480.5052861.6699890.8619061.0582060.2195021.3375420.8330801.1057661.0444860.6310540.9260490.2003311.124687-0.2897282.292333-0.2921472.3225682.593849-1.597720-1.1684340.4376301.6737512.223847-0.0526301.9850490.082005-0.0164551.352714-0.6089203.0116470.0362870.8259170.7006541.4492060.6140311.3572241.6099831.8248931.1015781.4180880.225700-0.8698661.8127371.6477671.4986892.1371330.9831601.5882311.124584450.9055991.9533801.8377393.563993-0.3079081.7818660.3558890.0754420.941566-0.239361-0.0632272.7883242.3764922.7866911.0795562.1930141.0784932.3704790.2991860.1276161.4876891.584534-0.7538731.6456512.551776-0.224763-0.2212691.6033331.1597971.9737760.042913-0.3940830.0294480.0516270.5039581.4152240.9682360.4100071.6803200.628430-0.3465700.0033901.835854-0.2033471.466395-0.090401-0.0219631.5716282.0524812.7847322.364528-0.8840160.7262320.7648671.1717920.0934081.8737990.5355230.9003920.0903652.7097461.853469-0.4985452.5791672.3627262.2862560.9447901.1533980.0570571.1031401.8991351.1638511.0225561.9859812.2418041.2465650.9696870.1980110.3934072.1519961.746980-0.2039381.987448-0.9068331.4313460.839038-0.1908290.8147020.2759450.0317692.0625611.0431920.7850981.1059381.3876930.9996821.3437930.0344581.0340860.6282420.1707711.9294971.1969610.7244961.0622481.249923-0.5244080.9096232.8462902.0416411.2627920.6399172.3989480.9377910.2417830.9142531.2093460.8505272.2065391.1206041.937266-0.332153-0.0012921.0660090.7592811.4003060.7292481.783116-0.1516782.271785-1.1527071.2612401.8199380.6872241.2810810.5711750.8084830.3014271.2861921.5763771.210853-1.026796-0.3712001.9399681.4904371.5697440.6385962.8085901.3283760.5075230.3095981.2971382.0377191.0266021.4482362.0249180.5304450.6766280.9133570.1375722.1559860.416356-0.4164611.799196-1.0638560.5423271.3157950.9860410.6239310.2846442.802760-0.5395262.1443821.1375980.2897340.520737-0.0009711.4479790.9613560.5335881.6683393.2431600.8029800.3322640.4093172.6884401.9153961.7505530.0852660.3960630.0211071.5596641.0551292.063743-0.9109792.1018290.7266290.7689390.2214650.121983-0.0028121.4865851.2612450.6850051.5062801.7878231.467778-0.4809241.2190481.7755721.1383772.5378530.8122802.1950941.0749163.3572660.9235961.3226660.7663740.3658860.6644510.636817-0.261115-0.5625120.781340-0.1231340.771261-0.036545-1.1915390.3268390.849196-0.2011961.0835512.8192170.443742-0.0137511.8049582.1388490.0867883.0474930.1052172.0591030.394143-0.0968321.2176433.1220472.121491-0.101166-0.2725711.843459

Or, you may wish to leave off the indices altogether:

toyplot.matrix((big_matrix, colormap), tshow=False, lshow=False, label="A matrix");
A matrix0.7733680.0761691.355839-0.2700630.8045280.5365811.9894152.3886472.0877141.4388010.0383982.2456101.5029260.3686010.2957480.7595171.5855991.352801-0.8155580.0898760.2514720.8918751.2747791.2373500.7401560.6875581.4485100.9404680.5299851.349567-0.0274690.6933622.406176-0.249697-0.5601492.5573980.4066440.8297112.6726270.4592000.3158721.5999620.7828011.3315270.6166350.2181841.2662371.279428-0.2196260.276051-0.7347781.2716611.0991120.6369100.4117731.0259420.4276982.105587-0.208016-0.3397013.075185-0.489410-0.1509531.4190601.4134051.7175771.2617250.7572290.4987320.3018712.3845800.7135751.5000702.9511030.7216331.0367861.445853-0.4103511.4500011.515480-0.154084-0.3801730.5041670.586721-0.7193170.9704390.2339601.0998820.286976-1.2261181.7257141.9169760.436110-0.5221800.9857210.7532790.8346711.119114-1.074980-0.0027551.5235461.8215170.8512580.9546300.2955072.7303161.2289272.0927410.6464280.9693410.7998280.5186902.7114262.435387-0.1675201.0408431.3620181.5725922.1044600.5743281.7556891.0102811.224586-0.1347080.0484790.8728701.0289443.1040772.5675140.3757700.599356-0.1370620.096841-0.0972780.928691-0.3193390.4399071.1649550.3684140.132930-0.0025632.2073482.7119870.3754110.787854-0.1935641.6575861.2000802.0912600.5109782.3682201.8916251.8375661.5141450.9499501.743953-0.7240501.0899021.3227400.6228510.9997792.0501140.8313011.7978761.552524-0.1530932.641552-0.4389783.027740-0.3653171.0721491.6131522.4891661.221297-0.5308921.8018880.5755332.1188552.5695482.427732-0.3718380.7335821.7792150.8971860.4135351.2402530.0019441.1911700.0471972.4709971.7189050.8334401.764611-0.1894430.4651430.978402-0.105192-0.0559462.0213562.7096561.0295621.1238421.2894300.6985081.4144351.9498581.521849-0.9692631.5028100.6455780.553010-0.1169780.2117342.055752-0.3045411.5397351.3469911.874193-0.5751790.8400160.3566670.2846292.6994592.2828370.5474421.3938001.4257410.8699530.6062670.3589401.1719640.1598511.8649980.7951390.8929270.7578930.0975171.7978710.7109041.6769780.6568161.4872101.765665-1.200564-1.5960621.475675-0.594886-0.1100770.001594-1.2758072.552807-0.1492991.1885311.988964-0.5861360.5276190.8111541.2111272.6117221.5667300.3588232.5387741.3096640.5511512.7691011.268200-0.4622252.8508102.7007701.3533911.3364892.0571052.198679-1.5946540.2852551.8043462.1916550.872635-0.0749752.4482690.721646-0.0368191.2014511.5017562.613335-0.8977112.2990831.5531840.7996381.5456701.2622871.2190701.9323532.7430520.8752961.9540321.7120510.4206630.2381812.6615023.5476920.9610880.643591-0.8625693.6519990.8637701.1037491.1154321.2586702.4877432.4543431.7043082.4663511.353622-0.0855231.363210-0.8132770.8020891.4328750.4594341.2956313.079844-0.8424330.4888340.4190652.0627361.0180551.022798-0.6797911.8124230.374111-0.2502711.6151350.878605-0.2808951.3246101.6705691.1491611.3270640.6470380.0944722.6761851.6809960.2962821.1020802.1950560.7220410.9478351.3536840.591689-0.8104300.0966922.0540450.0191231.3520791.6659822.0655020.7715661.364484-0.5148470.9247390.7029420.2725860.7541250.8720510.630689-1.6230043.1158511.6855620.8425562.3812881.0684271.3125361.4542530.2115280.934160-0.4184800.8602470.4446450.4980821.6931190.754640-0.2694320.7376763.3375980.2182831.080100-0.3394111.4134511.2044521.4784531.0295810.8175581.0174673.054290-1.5318831.4238150.0443160.866326-0.0774032.2499031.5711491.2970481.8718650.8362891.6895232.9845900.8817181.955130-0.1805532.4704740.9784421.7108610.188165-1.251213-0.1261000.6921330.0381151.6708261.0633830.3432040.7116370.7802071.2002480.1545003.6429230.6662550.8544921.8933692.2885551.3311980.9246320.9388522.8560570.2469590.6597740.4490040.3959633.1225901.0203060.1337400.6441120.0456582.5914641.0005870.535968-0.5237111.1548700.1593511.0106860.4562601.6754550.0266581.8183480.8839830.3091422.0389551.9812721.6166210.2125131.0208571.5993400.6218050.9445312.9834881.0778881.4045840.1509900.9219100.4726880.7573122.1069500.9644700.0400850.3710491.2685151.4883611.5868390.8246070.5665741.043672-1.368893-0.592721-1.4416710.7372660.1773820.9577320.6087301.2305801.3285641.8380490.0921180.958254-0.9943361.1081640.4107140.015020-0.0361773.0396860.3412430.3920161.8664530.258531-0.4705611.7084740.8714880.8393602.0771700.3866030.2882361.0654390.5785290.6587832.312037-0.8229321.2153760.3292871.2597171.4695491.4922331.512171-0.1420200.8851062.2659750.0707701.1909152.0015560.902579-1.119597-1.1969222.1222683.0118421.3020110.5103380.486451-0.0739213.2035150.7011722.3460981.6268200.934189-0.8438651.1099733.0065610.2421492.015998-0.5924931.2923672.3370320.7567460.7689760.6610711.3186162.3970390.1201871.1118201.4315682.6137850.7026152.6389621.1340971.172037-0.3650170.5787341.880640-0.4725671.7577100.3633950.9841620.6121851.8896632.1341572.7316300.294480-0.28581