r - unable to create a heat map with ggplot2 -


 dput(head(tt,500)) structure(list(date = structure(c(15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744, 15744,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745, 15745,  15745, 15745, 15745, 15745, 15745, 15745, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746, 15746,  15746, 15746, 15746, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747, 15747,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748, 15748,  15748, 15748, 15748, 15748, 15748, 15748, 15749, 15749, 15749,  15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749,  15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749,  15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749,  15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749, 15749,  15749), class = "date"), time1 = structure(c(0.0100694444444444,  0.0204976851851852, 0.0309143518518519, 0.0413310185185185, 0.0517476851851852,  0.0621643518518519, 0.0725810185185185, 0.0830092592592593, 0.0934259259259259,  0.103842592592593, 0.114259259259259, 0.124675925925926, 0.135092592592593,  0.145520833333333, 0.1559375, 0.166354166666667, 0.176770833333333,  0.1871875, 0.197604166666667, 0.208032407407407, 0.218449074074074,  0.228865740740741, 0.239282407407407, 0.249699074074074, 0.260115740740741,  0.270532407407407, 0.280960648148148, 0.291377314814815, 0.301793981481481,  0.312210648148148, 0.322627314814815, 0.333043981481481, 0.343460648148148,  0.353877314814815, 0.364293981481481, 0.374722222222222, 0.385138888888889,  0.395555555555556, 0.405972222222222, 0.416388888888889, 0.426805555555556,  0.437222222222222, 0.447650462962963, 0.45806712962963, 0.468483796296296,  0.478900462962963, 0.48931712962963, 0.499733796296296, 0.510162037037037,  0.520578703703704, 0.53099537037037, 0.541412037037037, 0.551828703703704,  0.56224537037037, 0.572673611111111, 0.583090277777778, 0.593506944444444,  0.603923611111111, 0.614340277777778, 0.624756944444444, 0.635185185185185,  0.645601851851852, 0.656018518518519, 0.666435185185185, 0.676851851851852,  0.687268518518519, 0.697685185185185, 0.708113425925926, 0.718530092592593,  0.728946759259259, 0.739363425925926, 0.749780092592593, 0.760196759259259,  0.770613425925926, 0.781030092592593, 0.791458333333333, 0.801875,  0.812291666666667, 0.822708333333333, 0.833125, 0.843541666666667,  0.853958333333333, 0.864375, 0.874803240740741, 0.885219907407407,  0.895636574074074, 0.906053240740741, 0.916469907407407, 0.926886574074074,  0.937303240740741, 0.947731481481481, 0.958148148148148, 0.968564814814815,  0.978981481481481, 0.989398148148148, 0.999814814814815, 0.0100694444444444,  0.0204861111111111, 0.0309027777777778, 0.0413310185185185, 0.0517476851851852,  0.0621643518518519, 0.0725810185185185, 0.0829976851851852, 0.0934143518518518,  0.103831018518519, 0.114259259259259, 0.124675925925926, 0.135092592592593,  0.145509259259259, 0.155925925925926, 0.166342592592593, 0.176759259259259,  0.1871875, 0.197604166666667, 0.208020833333333, 0.2184375, 0.228854166666667,  0.239270833333333, 0.2496875, 0.260115740740741, 0.270532407407407,  0.280949074074074, 0.291365740740741, 0.301782407407407, 0.312199074074074,  0.322615740740741, 0.333032407407407, 0.343460648148148, 0.353877314814815,  0.364293981481481, 0.374710648148148, 0.385127314814815, 0.395543981481481,  0.405960648148148, 0.416377314814815, 0.426793981481481, 0.437222222222222,  0.447638888888889, 0.458055555555556, 0.468472222222222, 0.478888888888889,  0.489305555555556, 0.499722222222222, 0.510138888888889, 0.520555555555556,  0.530983796296296, 0.541400462962963, 0.55181712962963, 0.562233796296296,  0.572650462962963, 0.58306712962963, 0.593483796296296, 0.603900462962963,  0.61431712962963, 0.624733796296296, 0.635162037037037, 0.645578703703704,  0.65599537037037, 0.666412037037037, 0.676828703703704, 0.68724537037037,  0.697662037037037, 0.708078703703704, 0.71849537037037, 0.728912037037037,  0.739340277777778, 0.749756944444444, 0.760173611111111, 0.770590277777778,  0.781006944444444, 0.791423611111111, 0.801840277777778, 0.812256944444444,  0.822673611111111, 0.833101851851852, 0.843518518518519, 0.853935185185185,  0.864351851851852, 0.874768518518519, 0.885185185185185, 0.895601851851852,  0.906018518518519, 0.916446759259259, 0.926863425925926, 0.937280092592593,  0.947696759259259, 0.958113425925926, 0.968530092592593, 0.978946759259259,  0.989363425925926, 0.999780092592593, 0.0100694444444444, 0.0204861111111111,  0.0309143518518519, 0.0413310185185185, 0.0517476851851852, 0.0621643518518519,  0.0725810185185185, 0.0829976851851852, 0.0934259259259259, 0.103842592592593,  0.114259259259259, 0.124675925925926, 0.135092592592593, 0.145509259259259,  0.1559375, 0.166354166666667, 0.176770833333333, 0.1871875, 0.197604166666667,  0.208020833333333, 0.218449074074074, 0.228865740740741, 0.239282407407407,  0.249699074074074, 0.260115740740741, 0.270532407407407, 0.280949074074074,  0.291377314814815, 0.301793981481481, 0.312210648148148, 0.322627314814815,  0.333043981481481, 0.343460648148148, 0.353888888888889, 0.364305555555556,  0.374722222222222, 0.385138888888889, 0.395555555555556, 0.405972222222222,  0.416400462962963, 0.42681712962963, 0.437233796296296, 0.447650462962963,  0.45806712962963, 0.468483796296296, 0.478935185185185, 0.489363425925926,  0.499780092592593, 0.510208333333333, 0.520625, 0.531041666666667,  0.541458333333333, 0.551875, 0.562303240740741, 0.572719907407407,  0.583136574074074, 0.593553240740741, 0.603969907407407, 0.614386574074074,  0.624803240740741, 0.635219907407407, 0.645636574074074, 0.656064814814815,  0.666481481481481, 0.676898148148148, 0.687314814814815, 0.697731481481481,  0.708148148148148, 0.718564814814815, 0.728981481481481, 0.739409722222222,  0.749826388888889, 0.760243055555556, 0.770659722222222, 0.781076388888889,  0.791493055555556, 0.801909722222222, 0.812337962962963, 0.82275462962963,  0.833171296296296, 0.843587962962963, 0.85400462962963, 0.864421296296296,  0.874837962962963, 0.88525462962963, 0.895671296296296, 0.906099537037037,  0.916516203703704, 0.926909722222222, 0.937337962962963, 0.947777777777778,  0.958206018518518, 0.968530092592593, 0.978958333333333, 0.989375,  0.999791666666667, 0.0100694444444444, 0.0204976851851852, 0.0309143518518519,  0.0413310185185185, 0.0517476851851852, 0.0621759259259259, 0.0725925925925926,  0.0830092592592593, 0.0934375, 0.103854166666667, 0.114270833333333,  0.124699074074074, 0.135115740740741, 0.145532407407407, 0.155960648148148,  0.166377314814815, 0.176805555555556, 0.187222222222222, 0.197650462962963,  0.20806712962963, 0.21849537037037, 0.228912037037037, 0.239340277777778,  0.249768518518519, 0.260185185185185, 0.270601851851852, 0.281030092592593,  0.291446759259259, 0.301863425925926, 0.312280092592593, 0.322696759259259,  0.333125, 0.343541666666667, 0.353958333333333, 0.364375, 0.374791666666667,  0.385219907407407, 0.395636574074074, 0.406053240740741, 0.416469907407407,  0.426886574074074, 0.437314814814815, 0.447731481481482, 0.458148148148148,  0.468564814814815, 0.478981481481482, 0.489409722222222, 0.499826388888889,  0.510243055555556, 0.520659722222222, 0.531076388888889, 0.54150462962963,  0.551921296296296, 0.562337962962963, 0.57275462962963, 0.583171296296296,  0.593599537037037, 0.604016203703704, 0.61443287037037, 0.624849537037037,  0.635266203703704, 0.64568287037037, 0.656111111111111, 0.666527777777778,  0.676944444444444, 0.687361111111111, 0.697777777777778, 0.708194444444444,  0.718611111111111, 0.729039351851852, 0.739456018518518, 0.749872685185185,  0.760289351851852, 0.770706018518518, 0.781134259259259, 0.791550925925926,  0.801967592592593, 0.812384259259259, 0.822800925925926, 0.833229166666667,  0.843645833333333, 0.8540625, 0.864479166666667, 0.874895833333333,  0.885324074074074, 0.895740740740741, 0.906157407407407, 0.916574074074074,  0.927002314814815, 0.937418981481482, 0.947835648148148, 0.958252314814815,  0.968668981481482, 0.979097222222222, 0.989513888888889, 0.999930555555556,  0.0100810185185185, 0.0204976851851852, 0.0309143518518519, 0.0413310185185185,  0.0517476851851852, 0.0621759259259259, 0.0725925925925926, 0.0830092592592593,  0.0934259259259259, 0.103854166666667, 0.114270833333333, 0.1246875,  0.135104166666667, 0.145532407407407, 0.155949074074074, 0.166365740740741,  0.176793981481481, 0.187210648148148, 0.197627314814815, 0.208055555555556,  0.218472222222222, 0.228888888888889, 0.239305555555556, 0.249733796296296,  0.260150462962963, 0.27056712962963, 0.280983796296296, 0.291412037037037,  0.301828703703704, 0.31224537037037, 0.322662037037037, 0.333078703703704,  0.343506944444444, 0.353923611111111, 0.364340277777778, 0.374756944444444,  0.385173611111111, 0.395601851851852, 0.406018518518519, 0.416435185185185,  0.426851851851852, 0.437268518518519, 0.447696759259259, 0.458113425925926,  0.468530092592593, 0.478946759259259, 0.489363425925926, 0.499780092592593,  0.510208333333333, 0.520625, 0.531041666666667, 0.541458333333333,  0.551875, 0.562303240740741, 0.572719907407407, 0.583136574074074,  0.593553240740741, 0.603969907407407, 0.614398148148148, 0.624814814814815,  0.635231481481481, 0.645648148148148, 0.656064814814815, 0.666481481481481,  0.676909722222222, 0.687326388888889, 0.697743055555556, 0.708159722222222,  0.718576388888889, 0.728993055555556, 0.739421296296296, 0.749837962962963,  0.76025462962963, 0.770671296296296, 0.781087962962963, 0.791516203703704,  0.80193287037037, 0.812349537037037, 0.822766203703704, 0.83318287037037,  0.843611111111111, 0.854027777777778, 0.864444444444444, 0.874861111111111,  0.885277777777778, 0.895694444444444, 0.906122685185185, 0.916539351851852,  0.926956018518518, 0.937372685185185, 0.947800925925926, 0.958217592592593,  0.968634259259259, 0.979050925925926, 0.989467592592593, 0.999895833333333,  0.0100810185185185, 0.0204976851851852, 0.0309143518518519, 0.0413310185185185,  0.0517476851851852, 0.0621643518518519, 0.0725810185185185, 0.0830092592592593,  0.0934259259259259, 0.103842592592593, 0.114270833333333, 0.1246875,  0.135104166666667, 0.145520833333333, 0.155949074074074, 0.166365740740741,  0.176782407407407, 0.187210648148148, 0.197627314814815, 0.208043981481481 ), format = "h:m:s", class = "times"), cpu = c(27.7058823529412,  28.1, 25.5444444444444, 24.4333333333333, 25.3222222222222, 22.3666666666667,  20.8555555555556, 19.5777777777778, 20.8555555555556, 20.0333333333333,  19.1888888888889, 18.5444444444444, 19.3333333333333, 19.0222222222222,  17.3111111111111, 17.2777777777778, 17.2777777777778, 17.1555555555556,  17.2333333333333, 17.3777777777778, 17.5444444444444, 18.2222222222222,  17.7444444444444, 18.6333333333333, 21.6333333333333, 23.9, 27.9666666666667,  28.5222222222222, 32.1777777777778, 33.0111111111111, 36.5222222222222,  38.1111111111111, 43.8, 48.1666666666667, 52.4222222222222, 54.4444444444444,  60.8222222222222, 64.7111111111111, 60.5777777777778, 65.9111111111111,  67.3777777777778, 65.7777777777778, 66.6555555555556, 67.9888888888889,  70.9777777777778, 70.6888888888889, 66.3777777777778, 68.3, 66.0222222222222,  66.1777777777778, 64.9333333333333, 63.8, 66.1444444444444, 65.2888888888889,  63.1222222222222, 61.1666666666667, 62.9, 62.6444444444444, 60.9888888888889,  60.2222222222222, 57.8555555555556, 56.9333333333333, 56.1555555555556,  57, 53.0222222222222, 54.2222222222222, 54.0333333333333, 52.5777777777778,  52.0333333333333, 51.6111111111111, 49.0444444444444, 48.3777777777778,  48.3444444444444, 50.1666666666667, 47.2, 44.4888888888889, 44.5111111111111,  43.7222222222222, 40.6111111111111, 39.2888888888889, 39.5333333333333,  36.6555555555556, 34.1888888888889, 33.6111111111111, 33.9222222222222,  33.3, 31.0777777777778, 29.8333333333333, 29.3444444444444, 29.7888888888889,  27.3888888888889, 25.9444444444444, 24.0666666666667, 23.4, 26.6666666666667,  26.5888888888889, 30.5294117647059, 25.7333333333333, 27.2666666666667,  26.7, 24.8666666666667, 23.3666666666667, 23.6333333333333, 21.7,  19.6666666666667, 22.4666666666667, 19.2333333333333, 20.9, 18.4333333333333,  19.6666666666667, 19.2666666666667, 19.8666666666667, 18.8666666666667,  18.3666666666667, 16.1666666666667, 15.6333333333333, 15.9333333333333,  17.1333333333333, 18.3, 23.7333333333333, 22.4, 20.4333333333333,  18.9666666666667, 19.3333333333333, 22.8333333333333, 25.0333333333333,  26.5333333333333, 29.7333333333333, 34.1666666666667, 35.9333333333333,  39.1, 37.4, 43.9, 38.6333333333333, 46.0333333333333, 49.2, 49.0666666666667,  54.1666666666667, 54.6333333333333, 52, 57.6666666666667, 54.5333333333333,  53.2, 53.8, 54.0666666666667, 61.0666666666667, 56.7333333333333,  53.6, 52.7, 54.9, 51.0333333333333, 53.9333333333333, 52, 49.3,  48.3666666666667, 48.1333333333333, 46.0333333333333, 46.8333333333333,  42.9333333333333, 47.0666666666667, 49.1, 48.6666666666667, 48.4,  42.7333333333333, 45.2333333333333, 37, 37.7666666666667, 36.1333333333333,  40.3666666666667, 39.8666666666667, 36.6333333333333, 38.7666666666667,  40, 34.4666666666667, 34.0333333333333, 35.5, 35.8666666666667,  30.3666666666667, 38.5666666666667, 27.4, 29.3666666666667, 39.6,  45.4333333333333, 61.4666666666667, 62.6666666666667, 61.7, 63.7666666666667,  61.6, 49.8, 52.2666666666667, 44.2666666666667, 37.9, 27.6428571428571,  26.6, 24.4333333333333, 25.1444444444444, 26.5555555555556, 22.0666666666667,  19.8, 19.9555555555556, 20.1111111111111, 18.2444444444444, 18.4333333333333,  17.1777777777778, 17.4333333333333, 18.5777777777778, 17.6888888888889,  16.1111111111111, 17.6777777777778, 17.4333333333333, 16.0888888888889,  17.0444444444444, 16.0444444444444, 15.1777777777778, 14.1888888888889,  16.0888888888889, 17.4222222222222, 17.0222222222222, 18.2111111111111,  20.6, 21.2111111111111, 21.9, 23.1888888888889, 24.9888888888889,  27.7, 30.9333333333333, 32.9444444444444, 35.4333333333333, 36.6666666666667,  40.2333333333333, 39.2222222222222, 40.3777777777778, 45.2444444444444,  46.7666666666667, 48.3777777777778, 51.5888888888889, 53.5222222222222,  42.3157894736842, 34.7866666666667, 32.7733333333333, 36.4466666666667,  31.98, 36.8133333333333, 34.34, 34.8, 34.0266666666667, 33.7733333333333,  32.1266666666667, 33.3066666666667, 34.4733333333333, 31.82,  31.8, 33.84, 33.78, 31.9066666666667, 29.7666666666667, 28.3466666666667,  28.62, 27.9866666666667, 28.82, 27.5, 29.4466666666667, 27.92,  28.0733333333333, 27.2666666666667, 28.0533333333333, 27.52,  25.8866666666667, 26.38, 26.8933333333333, 26.36, 25.88, 25.96,  26.8133333333333, 23.9133333333333, 26.4066666666667, 25.08,  23.7933333333333, 21.2333333333333, 17.3666666666667, 16.4807692307692,  16.9777777777778, 14.9555555555556, 16.3218390804598, 28.8684210526316,  31.6, 38.1, 35.3, 21.8627450980392, 19.3, 17, 16.7, 16.1444444444444,  14.3, 13.7333333333333, 13.4777777777778, 13.0333333333333, 12.1666666666667,  11.3, 11.9111111111111, 11.3222222222222, 11.4555555555556, 10.5333333333333,  10.7777777777778, 10.9111111111111, 11.1, 9.28888888888889, 9.35555555555556,  9.95555555555556, 10, 9.47777777777778, 10.3333333333333, 11.3222222222222,  12.3333333333333, 14.1555555555556, 15.3555555555556, 17.1777777777778,  19.0888888888889, 20.1555555555556, 21.5444444444444, 26.0555555555556,  29.2777777777778, 31.1666666666667, 32.5333333333333, 36.5555555555556,  39.3555555555556, 41.6888888888889, 45.4888888888889, 46.7333333333333,  49.5111111111111, 50.6777777777778, 49.8555555555556, 50.2777777777778,  51.4666666666667, 47.0333333333333, 48.6, 51.1888888888889, 48.6555555555556,  46.5, 44.8444444444444, 45.9, 48.2333333333333, 46.7555555555556,  45.3111111111111, 46.0888888888889, 48.5555555555556, 46.0555555555556,  44.8777777777778, 44.5, 46.0666666666667, 45.6777777777778, 43.6,  44.5888888888889, 46.0555555555556, 45.4111111111111, 44.7555555555556,  43.3222222222222, 43.9888888888889, 43.1666666666667, 42.4777777777778,  41.4, 40.7555555555556, 40.2111111111111, 39.7333333333333, 38.9555555555556,  38.7111111111111, 38.9444444444444, 37.8222222222222, 37.5444444444444,  38.1888888888889, 37.2444444444444, 36.7222222222222, 36.7333333333333,  37.2333333333333, 35.3666666666667, 35.0444444444444, 34.7111111111111,  33.5666666666667, 32.4111111111111, 30.6222222222222, 29.9444444444444,  29.7888888888889, 29.7111111111111, 28.5, 27.6470588235294, 25.9,  24.0222222222222, 22.0444444444444, 22.5888888888889, 19.9888888888889,  17.3555555555556, 17.7555555555556, 17.6, 16.8, 16.2333333333333,  16.1666666666667, 18.5555555555556, 19.0444444444444, 17.6111111111111,  18, 18.3111111111111, 18.5333333333333, 18.2333333333333, 18.1888888888889,  18.2555555555556, 19.1, 18.8777777777778, 19.1333333333333, 20.2777777777778,  21.4111111111111, 23.4444444444444, 25.2777777777778, 27.3555555555556,  29.2666666666667, 31.5555555555556, 32.0888888888889, 34.4333333333333,  36.7444444444444, 38.5777777777778, 41.2555555555556, 42.9777777777778,  44.7777777777778, 44.7444444444444, 44.9333333333333, 48.4666666666667,  46.9888888888889, 47.3333333333333, 48.2777777777778, 47.1333333333333,  48.3444444444444, 48.5555555555556, 51.4222222222222, 49.3444444444444,  47.8222222222222, 45.5888888888889, 46.2888888888889, 47.5666666666667,  45.0111111111111, 45.9111111111111, 46.6333333333333, 43.9777777777778,  46.1777777777778, 44.9, 44.7777777777778, 45.7777777777778, 45.8444444444444,  44.4666666666667, 44.1444444444444, 44.5111111111111, 44.5666666666667,  42.7777777777778, 43.2666666666667, 43.0666666666667, 43.1222222222222,  42.5, 40.6222222222222, 40.2555555555556, 40.7222222222222, 39.8888888888889,  39.6333333333333, 39.1888888888889, 39.6777777777778, 39.1666666666667,  39.5111111111111, 38.2666666666667, 39.0222222222222, 37.5666666666667,  36.6888888888889, 37.4222222222222, 37.5777777777778, 36.8444444444444,  35.7222222222222, 35.7444444444444, 35.9111111111111, 33.2111111111111,  31.8555555555556, 29.5, 28.5888888888889, 27.6333333333333, 29.5555555555556,  29.1960784313725, 28.5555555555556, 26.8333333333333, 25.3222222222222,  25.1555555555556, 23.0555555555556, 22.1777777777778, 20.7333333333333,  20.8222222222222, 20.8, 19.9444444444444, 19.5666666666667, 19,  19.1888888888889, 18.5111111111111, 17.8777777777778, 17.6111111111111,  18.3555555555556, 18.5777777777778, 19.0777777777778)), .names = c("date",  "time1", "cpu"), row.names = c(na, 500l), class = "data.frame") 

this part brian diggs code scale y-axis:

library(scales) timesreverse_trans <- function() {     trans <- function(x) {-as.numeric(x)}     inv <- function(x) {times(-x)}     fmt <- function(x) {         notone <- x != 1         simplify <- !any(diff(x) < 1/(24*60))         ifelse(notone,                format(x-floor(x), simplify=simplify),                ifelse(simplify, "24:00", "24:00:00"))     }     trans_new("chrontimes-reverse",               transform = trans,               inverse = inv,               breaks = pretty_breaks(),               format = fmt,               domain=c(0,1)) } scale_y_times <- function(..., trans=null) {     scale_y_continuous(trans=timesreverse_trans(), ...) } 

i have data frame tt. when try run code, dont see color on chart. little dots.

library(ggplot2) library(scales) library(zoo) library(xts) library(chron)  val=c(0,0.29,0.39,0.49,0.59, 0.69,0.79, 0.89, 1) cols=c("white","#f0ffff","#aeeeee","#add8e6","#33ffff","green","yellow","orange", "#ff0000", "#ff0000") brk = c(20, 30, 40, 50, 60, 70, 80, 90, 100)     ggplot(tt, aes(date, time1, fill=cpu)) + geom_tile() + theme_bw() + scale_fill_gradientn(name="cpu utilization", colours=cols, values=val, limits=c(0,100), breaks = brk) + guides(fill = guide_legend(keywidth = 5, keyheight = 1)) + scale_y_times() 

when subset tt data frame 1 works.

library(ggplot2) library(scales) library(zoo) library(xts) library(chron)   val=c(0,0.29,0.39,0.49,0.59, 0.69,0.79, 0.89, 1) cols=c("white","#f0ffff","#aeeeee","#add8e6","#33ffff","green","yellow","orange", "#ff0000", "#ff0000") brk = c(20, 30, 40, 50, 60, 70, 80, 90, 100)  ggplot(subset(tt, date %in% as.date(c("2013-02-08"))),aes(date, time1, fill=cpu)) + geom_tile() + theme_bw() + scale_fill_gradientn(name="cpu utilization", colours=cols, values=val, limits=c(0,100), breaks = brk) + guides(fill = guide_legend(keywidth = 5, keyheight = 1)) + scale_y_times() 

can tell me how address problem?

i'm not familiar chron package, maybe not best answer. problem originates values stored in tt$time1. unequal each other means every single value new tile created in plot. in result tiles become thin. far see, best way overcome rounding time points using trunc:

tt$time1 <- trunc(tt$time1, "0:15:00") 

calling original code gives

enter image description here

by way, large data, i'd suggest use geom_raster() instead of geom_tile() since it's faster.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -