1 2 I'm trying to develop a multiplot heatmap.2 saved to a pdf. I'm having some success but the axis labels are getting chopped off. Subplot titles are also desirable but again the labels are getting chopped. Here's my reproducible code: library(gridExtra) library(grid) library(gridGraphics) library(gplots) Col = colorRampPalette(c("red","orange","yellow", "white")) grab_grob <- function() grid.echo() grid.grab() par(cex.main=0.1, mar = c(1,1,1,1) ) #data<-read.table("heatmap.input.matrix.data.txt") lmat = rbind(c(2,3),c(4,1),c(4,1)) lwid = c(2.5,4) lhei = c(0.5,4,3) labRowvec <- c(rep(NULL, dim(matrix(runif(1000, 1,10),ncol=50))[1])) labColvec <- c(rep(NULL, dim(matrix(runif(1000, 1,10),ncol=50))[2])) gl <- lapply(1:12, function(i) heatmap.2(matrix(runif(1000, 1,10),ncol=50), dendrogram = "none",offsetRow=-0.5, offsetCol=-1,srtCol=0, density="density", lmat =lmat,lhei = l
(function() {
var items = ['id': '2963451613719937858', 'body': 'Nice work bro. But mine not showing on my blogger blogx3cbr /x3ex3cbr /x3ehttps://obhiabablog.blogspot.com.ng', 'timestamp': '1469098319403', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1469098319403#c2963451613719937858', 'author': 'name': 'Prince John Okosun', 'avatarUrl': '//lh3.googleusercontent.com/-c7AzYA2aDh8/AAAAAAAAAAI/AAAAAAAABic/wgYYWSvB-Ig/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/12301775134217028139', 'displayTime': 'Jul 21, 2016, 3:51:00 PM', 'deleteclass': 'item-control blog-admin pid-605869752', 'id': '1037318775281517817', 'body': 'Replace the URL http://www.mybloggertricks.com thrice with your URL. ', 'timestamp': '1469098574994', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1469098574994#c1037318775281517817', 'author': 'name': 'Mohammad Mustafa Ahmedzai', 'avatarUrl': '//lh4.googleusercontent.com/-f8qSqNLtpBU/AAAAAAAAAAI/AAAAAAAAQeo/f7nmpa1_dQ0/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/11681339458447132019', 'displayTime': 'Jul 21, 2016, 3:56:00 PM', 'deleteclass': 'item-control blog-admin pid-1736397285', 'id': '1401578348069611232', 'parentId': '2963451613719937858', 'body': 'sorry my mistake. I have corrected the code in step#10', 'timestamp': '1469099730912', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1469099730912#c1401578348069611232', 'author': 'name': 'Mohammad Mustafa Ahmedzai', 'avatarUrl': '//lh4.googleusercontent.com/-f8qSqNLtpBU/AAAAAAAAAAI/AAAAAAAAQeo/f7nmpa1_dQ0/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/11681339458447132019', 'displayTime': 'Jul 21, 2016, 4:15:00 PM', 'deleteclass': 'item-control blog-admin pid-1736397285', 'id': '7080210982661509306', 'parentId': '1037318775281517817', 'body': 'Thanks Admin. It worked. But when i try to increase the thumbnail size to width: 270px; height: 200px;, the image become blur and unclear.', 'timestamp': '1469116031917', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1469116031917#c7080210982661509306', 'author': 'name': 'Prince John Okosun', 'avatarUrl': '//lh3.googleusercontent.com/-c7AzYA2aDh8/AAAAAAAAAAI/AAAAAAAABic/wgYYWSvB-Ig/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/12301775134217028139', 'displayTime': 'Jul 21, 2016, 8:47:00 PM', 'deleteclass': 'item-control blog-admin pid-605869752', 'id': '7432251714508200870', 'body': 'beautifull widged', 'timestamp': '1469969028442', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1469969028442#c7432251714508200870', 'author': 'name': 'Imron Fhatoni', 'avatarUrl': '//lh6.googleusercontent.com/-TNht1GdNBsc/AAAAAAAAAAI/AAAAAAAAFPc/Pvf9BQ264lw/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/18030836574216391697', 'displayTime': 'Jul 31, 2016, 5:43:00 PM', 'deleteclass': 'item-control blog-admin pid-517472248', 'id': '5148619135925746571', 'body': 'Hiiii,x3cbr /x3eNice!!!!Thank you for sharing this post..:)', 'timestamp': '1471011446617', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1471011446617#c5148619135925746571', 'author': 'name': 'Peter Mark', 'avatarUrl': '//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SAx3ds35', 'profileUrl': 'https://www.blogger.com/profile/16600105472043915152', 'displayTime': 'Aug 12, 2016, 7:17:00 PM', 'deleteclass': 'item-control blog-admin pid-915635260', 'id': '3694437506650692175', 'body': 'i installed the widget in my blog but its size is overflowing from my sidebar i mean its too big for my sidebar, is there any way to decrease the width?', 'timestamp': '1471399894362', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1471399894362#c3694437506650692175', 'author': 'name': 'The Vip', 'avatarUrl': '//lh4.googleusercontent.com/-92i_f7XxBRc/AAAAAAAAAAI/AAAAAAAAAF8/_fZlfD0vEts/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/13867859789172830086', 'displayTime': 'Aug 17, 2016, 7:11:00 AM', 'deleteclass': 'item-control blog-admin pid-247592265', 'id': '1776913071131652471', 'body': 'My first comment on this lovely blog, am happy to say this that you have produced a student in Nigeria, and am using this medium to say a big thank you brother... x3cbr /x3eAm also using to tell you that am at the point of releasing two 2 blogger templates from the tutorials that I learnt from this platform. Am a good writer but just learning coding. x3cbr /x3eSo I want to add this widget as Horizontal and vertical List of Random in this templates, pls what changes should I make in this code? Warm regards and jazakumlahu hairan. ', 'timestamp': '1471424653127', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1471424653127#c1776913071131652471', 'author': 'name': 'Ola mouslat', 'avatarUrl': '//lh6.googleusercontent.com/-K_zd6PWGhlk/AAAAAAAAAAI/AAAAAAAACGY/qjWQgNrD9Os/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/04631609730781177630', 'displayTime': 'Aug 17, 2016, 2:04:00 PM', 'deleteclass': 'item-control blog-admin pid-1185614153', 'id': '767738580922348597', 'body': 'Thanks for this post. Pls I have search the whole of related articles on this blog looking for a related post widget without thumbnail. Do you have it ', 'timestamp': '1473066997374', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1473066997374#c767738580922348597', 'author': 'name': 'uthman saheed', 'avatarUrl': '//lh4.googleusercontent.com/-XGlBLSS8yTg/AAAAAAAAAAI/AAAAAAAACGg/nXweM5KmAQ8/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/00932760816409731382', 'displayTime': 'Sep 5, 2016, 2:16:00 PM', 'deleteclass': 'item-control blog-admin pid-1390967834', 'id': '469036103984997869', 'body': 'i love you', 'timestamp': '1475628357034', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1475628357034#c469036103984997869', 'author': 'name': 'iyke stanley', 'avatarUrl': '//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SAx3ds35', 'profileUrl': 'https://www.blogger.com/profile/12223564142700993961', 'displayTime': 'Oct 5, 2016, 5:45:00 AM', 'deleteclass': 'item-control blog-admin pid-1528409564', 'id': '9212291464062487240', 'body': 'admin thank you, i have done all what you said on your post on random post, but the script is appearing on top of my blog. in html formal', 'timestamp': '1478207495499', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1478207495499#c9212291464062487240', 'author': 'name': 'OKafor Vincent Toochukwu', 'avatarUrl': '//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SAx3ds35', 'profileUrl': 'https://www.blogger.com/profile/03988104036821859727', 'displayTime': 'Nov 4, 2016, 2:11:00 AM', 'deleteclass': 'item-control blog-admin pid-1353281586', 'id': '8298860237120546469', 'body': 'really love this. many thanks!', 'timestamp': '1478676768144', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1478676768144#c8298860237120546469', 'author': 'name': 'Sheriff Dol', 'avatarUrl': '//lh4.googleusercontent.com/-0pB2zVgbRgk/AAAAAAAAAAI/AAAAAAAAA-c/MwfNUX_z49w/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/11760617100624737775', 'displayTime': 'Nov 9, 2016, 12:32:00 PM', 'deleteclass': 'item-control blog-admin pid-2115861415', 'id': '4337111367376015322', 'body': 'Hello could you help me in 6 step how do i change to other styles', 'timestamp': '1481569721020', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1481569721020#c4337111367376015322', 'author': 'name': 'rikinno', 'avatarUrl': '//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SAx3ds35', 'profileUrl': 'https://www.blogger.com/profile/10545738753582205281', 'displayTime': 'Dec 13, 2016, 12:08:00 AM', 'deleteclass': 'item-control blog-admin pid-978359103', 'id': '3113158980411122247', 'body': 'Hello, Each x26quot;lix26quot; tag has its own class (such as .node0, .node1, .node2, etc. I do not understand this, I want it to stay, Horizontal List of Random Posts With Large Side Thumbnail. Where do I change the code?', 'timestamp': '1482171767389', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1482171767389#c3113158980411122247', 'author': 'name': 'rikinno', 'avatarUrl': '//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SAx3ds35', 'profileUrl': 'https://www.blogger.com/profile/10545738753582205281', 'displayTime': 'Dec 19, 2016, 11:22:00 PM', 'deleteclass': 'item-control blog-admin pid-978359103', 'id': '1085679421656940755', 'body': 'Hello, Each x26quot;lix26quot; tag has its own class (such as .node0, .node1, .node2, etc. I do not understand this, I want it to stay, Horizontal List of Random Posts With Large Side Thumbnail. Where do I change the code?', 'timestamp': '1484265715658', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1484265715658#c1085679421656940755', 'author': 'name': 'rikinno', 'avatarUrl': '//lh3.googleusercontent.com/zFdxGE77vvD2w5xHy6jkVuElKv-U9_9qLkRYK8OnbDeJPtjSZ82UPq5w6hJ-SAx3ds35', 'profileUrl': 'https://www.blogger.com/profile/10545738753582205281', 'displayTime': 'Jan 13, 2017, 5:01:00 AM', 'deleteclass': 'item-control blog-admin pid-978359103', 'id': '7931884321790693458', 'body': 'Can you make this but for Popular Post? Because the widget from Blogger seems sucks for my blog... thanks, great tutorial!', 'timestamp': '1488980432437', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1488980432437#c7931884321790693458', 'author': 'name': 'Andy Julianto', 'avatarUrl': '//lh6.googleusercontent.com/-ahgYbuDPOSQ/AAAAAAAAAAI/AAAAAAAAAC8/dmlGhxlF22s/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/09254646872930067099', 'displayTime': 'Mar 8, 2017, 6:40:00 PM', 'deleteclass': 'item-control blog-admin pid-262109926', 'id': '929985665344385788', 'body': 'Also, i noticed the thumbnail is always from youtube thumbnail if there is one in the post, and sometimes from other places. Is there any way to disable this, i only want use the main image i place in the postx3cbr /x3ex3cbr /x3ethanks again!', 'timestamp': '1488983055920', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1488983055920#c929985665344385788', 'author': 'name': 'Andy Julianto', 'avatarUrl': '//lh6.googleusercontent.com/-ahgYbuDPOSQ/AAAAAAAAAAI/AAAAAAAAAC8/dmlGhxlF22s/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/09254646872930067099', 'displayTime': 'Mar 8, 2017, 7:24:00 PM', 'deleteclass': 'item-control blog-admin pid-262109926', 'id': '8879872910929279843', 'body': 'Hello. Please a have a little problem.x3cbr /x3ex3cbr /x3eI tried using CSS to customize it to a horizontal list using .node but it only works for .node0 and posts all shown have .node0 as their class. How can i fix this?', 'timestamp': '1498892390621', 'permalink': 'https://www.mybloggertricks.com/2016/07/random-posts-widget-for-blogger.html?showCommentx3d1498892390621#c8879872910929279843', 'author': 'name': 'Prince John Okosun', 'avatarUrl': '//lh3.googleusercontent.com/-c7AzYA2aDh8/AAAAAAAAAAI/AAAAAAAABic/wgYYWSvB-Ig/s35-c/photo.jpg', 'profileUrl': 'https://www.blogger.com/profile/12301775134217028139', 'displayTime': 'Jul 1, 2017, 11:59:00 AM', 'deleteclass': 'item-control blog-admin pid-605869752'];
var msgs = 'loadMore': 'Load more...', 'loading': 'Loading...', 'loaded': 'No more!', 'addComment': 'Add comment', 'reply': 'Reply', 'delete': 'Delete';
var config = 'blogId': '8193278726666811965', 'postId': '6609752572216638183', 'feed': 'https://www.mybloggertricks.com/feeds/6609752572216638183/comments/default', 'authorName': 'M. Mustafa Ahmedzai', 'authorUrl': 'https://www.blogger.com/profile/11681339458447132019', 'baseUri': 'https://www.blogger.com', 'maxThreadDepth': 2;
// 0)
cursor = parseInt(items[items.length - 1].timestamp) + 1;
var bodyFromEntry = function(entry)
if (entry.gd$extendedProperty)
for (var k in entry.gd$extendedProperty)
if (entry.gd$extendedProperty[k].name == 'blogger.contentRemoved')
return '' + entry.content.$t + '';
return entry.content.$t;
var parse = function(data)
cursor = null;
var comments = ;
if (data && data.feed && data.feed.entry)
for (var i = 0, entry; entry = data.feed.entry[i]; i++)
var comment = ;
// comment ID, parsed out of the original id format
var id = /blog-(d+).post-(d+)/.exec(entry.id.$t);
comment.id = id ? id[2] : null;
comment.body = bodyFromEntry(entry);
comment.timestamp = Date.parse(entry.published.$t) + '';
if (entry.author && entry.author.constructor === Array)
var auth = entry.author[0];
if (auth)
comment.author =
name: (auth.name ? auth.name.$t : undefined),
profileUrl: (auth.uri ? auth.uri.$t : undefined),
avatarUrl: (auth.gd$image ? auth.gd$image.src : undefined)
;
if (entry.link)
if (entry.link[2])
comment.link = comment.permalink = entry.link[2].href;
if (entry.link[3])
var pid = /.*comments/default/(d+)?.*/.exec(entry.link[3].href);
if (pid && pid[1])
comment.parentId = pid[1];
comment.deleteclass = 'item-control blog-admin';
if (entry.gd$extendedProperty)
for (var k in entry.gd$extendedProperty)
if (entry.gd$extendedProperty[k].name == 'blogger.itemClass')
comment.deleteclass += ' ' + entry.gd$extendedProperty[k].value;
else if (entry.gd$extendedProperty[k].name == 'blogger.displayTime')
comment.displayTime = entry.gd$extendedProperty[k].value;
comments.push(comment);
return comments;
;
var paginator = function(callback) {
if (hasMore()) {
var url = config.feed + '?alt=json&v=2&orderby=published&reverse=false&max-results=50';
if (cursor)
url += '&published-min=' + new Date(cursor).toISOString();
window.bloggercomments = function(data) {
var parsed = parse(data);
cursor = parsed.length
Prince John OkosunJul 21, 2016, 3:51:00 PM
Nice work bro. But mine not showing on my blogger blog
https://obhiabablog.blogspot.com.ng
ReplyDelete
Replies
Mohammad Mustafa AhmedzaiJul 21, 2016, 4:15:00 PM
sorry my mistake. I have corrected the code in step#10
Delete
Mohammad Mustafa AhmedzaiJul 21, 2016, 3:56:00 PM
Replace the URL http://www.mybloggertricks.com thrice with your URL.
ReplyDelete
Replies
Prince John OkosunJul 21, 2016, 8:47:00 PM
Thanks Admin. It worked. But when i try to increase the thumbnail size to width: 270px; height: 200px;, the image become blur and unclear.
Delete
Imron FhatoniJul 31, 2016, 5:43:00 PM
beautifull widged
ReplyDelete
Peter MarkAug 12, 2016, 7:17:00 PM
Hiiii,
Nice!!!!Thank you for sharing this post..:)
ReplyDelete
The VipAug 17, 2016, 7:11:00 AM
i installed the widget in my blog but its size is overflowing from my sidebar i mean its too big for my sidebar, is there any way to decrease the width?
ReplyDelete
Ola mouslatAug 17, 2016, 2:04:00 PM
My first comment on this lovely blog, am happy to say this that you have produced a student in Nigeria, and am using this medium to say a big thank you brother...
Am also using to tell you that am at the point of releasing two 2 blogger templates from the tutorials that I learnt from this platform. Am a good writer but just learning coding.
So I want to add this widget as Horizontal and vertical List of Random in this templates, pls what changes should I make in this code? Warm regards and jazakumlahu hairan.
ReplyDelete
uthman saheedSep 5, 2016, 2:16:00 PM
Thanks for this post. Pls I have search the whole of related articles on this blog looking for a related post widget without thumbnail. Do you have it
ReplyDelete
iyke stanleyOct 5, 2016, 5:45:00 AM
i love you
ReplyDelete
OKafor Vincent ToochukwuNov 4, 2016, 2:11:00 AM
admin thank you, i have done all what you said on your post on random post, but the script is appearing on top of my blog. in html formal
ReplyDelete
Sheriff DolNov 9, 2016, 12:32:00 PM
really love this. many thanks!
ReplyDelete
rikinnoDec 13, 2016, 12:08:00 AM
Hello could you help me in 6 step how do i change to other styles
ReplyDelete
rikinnoDec 19, 2016, 11:22:00 PM
Hello, Each "li" tag has its own class (such as .node0, .node1, .node2, etc. I do not understand this, I want it to stay, Horizontal List of Random Posts With Large Side Thumbnail. Where do I change the code?
ReplyDelete
rikinnoJan 13, 2017, 5:01:00 AM
Hello, Each "li" tag has its own class (such as .node0, .node1, .node2, etc. I do not understand this, I want it to stay, Horizontal List of Random Posts With Large Side Thumbnail. Where do I change the code?
ReplyDelete
Andy JuliantoMar 8, 2017, 6:40:00 PM
Can you make this but for Popular Post? Because the widget from Blogger seems sucks for my blog... thanks, great tutorial!
ReplyDelete
Andy JuliantoMar 8, 2017, 7:24:00 PM
Also, i noticed the thumbnail is always from youtube thumbnail if there is one in the post, and sometimes from other places. Is there any way to disable this, i only want use the main image i place in the post
thanks again!
ReplyDelete
Prince John OkosunJul 1, 2017, 11:59:00 AM
Hello. Please a have a little problem.
I tried using CSS to customize it to a horizontal list using .node but it only works for .node0 and posts all shown have .node0 as their class. How can i fix this?
ReplyDelete