{"action":"created","issue":{"url":"https://api.github.com/repos/joshuaulrich/xtsExtra/issues/9","labels_url":"https://api.github.com/repos/joshuaulrich/xtsExtra/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/joshuaulrich/xtsExtra/issues/9/comments","events_url":"https://api.github.com/repos/joshuaulrich/xtsExtra/issues/9/events","html_url":"https://github.com/joshuaulrich/xtsExtra/issues/9","id":58825690,"number":9,"title":"[R-Forge #5873] plot2.xts - addLines error","user":{"login":"joshuaulrich","id":1023193,"avatar_url":"https://avatars.githubusercontent.com/u/1023193?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuaulrich","html_url":"https://github.com/joshuaulrich","followers_url":"https://api.github.com/users/joshuaulrich/followers","following_url":"https://api.github.com/users/joshuaulrich/following{/other_user}","gists_url":"https://api.github.com/users/joshuaulrich/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuaulrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuaulrich/subscriptions","organizations_url":"https://api.github.com/users/joshuaulrich/orgs","repos_url":"https://api.github.com/users/joshuaulrich/repos","events_url":"https://api.github.com/users/joshuaulrich/events{/privacy}","received_events_url":"https://api.github.com/users/joshuaulrich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joshuaulrich/xtsExtra/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"rossb34","id":5797430,"avatar_url":"https://avatars.githubusercontent.com/u/5797430?v=3","gravatar_id":"","url":"https://api.github.com/users/rossb34","html_url":"https://github.com/rossb34","followers_url":"https://api.github.com/users/rossb34/followers","following_url":"https://api.github.com/users/rossb34/following{/other_user}","gists_url":"https://api.github.com/users/rossb34/gists{/gist_id}","starred_url":"https://api.github.com/users/rossb34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossb34/subscriptions","organizations_url":"https://api.github.com/users/rossb34/orgs","repos_url":"https://api.github.com/users/rossb34/repos","events_url":"https://api.github.com/users/rossb34/events{/privacy}","received_events_url":"https://api.github.com/users/rossb34/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-02-24T23:43:37Z","updated_at":"2015-03-16T08:28:25Z","closed_at":"2015-03-16T08:28:25Z","body":"Submitted by: Peter Carl\nAssigned to: Nobody\n[R-Forge link](http://r-forge.r-project.org/tracker/index.php?func=detail&aid=5873&group_id=118&atid=516)\n\n> plot2_xts(CumReturns(R), theme=pccTheme, multi.panel=TRUE)\n> addLines(SMA(CumReturns(R[,1]), n=10), col='darkgray', on=1)\n Error in text.default(NROW(xdata[xsubset]) + 1/3, grid_lines(xdata, xsubset),  : \n  zero-length 'labels' specified \n\nHere's the traceback:\n\n10 text.default(NROW(xdata[xsubset]) + 1/3, grid_lines(xdata, xsubset), \n    noquote(format(grid_lines(xdata, xsubset), justify = 'right')), \n    col = theme$labels, offset = 0, pos = 4, cex = 0.9, xpd = TRUE) \n9 text(NROW(xdata[xsubset]) + 1/3, grid_lines(xdata, xsubset), \n    noquote(format(grid_lines(xdata, xsubset), justify = 'right')), \n    col = theme$labels, offset = 0, pos = 4, cex = 0.9, xpd = TRUE) \n8 eval(expr, envir, enclos) \n7 eval(aob, env) at replot_xts.R#243\n6 FUN(X[[13L]], ...) \n5 lapply(x$Env$actions, function(aob) {\n    if (attr(aob, 'frame') > 0) {\n        x$set_frame(attr(aob, 'frame'), attr(aob, 'clip'))\n        env <- attr(aob, 'env')\n        if (is.list(env)) {\n            env <- unlist(lapply(env, function(x) eapply(x, eval)), \n                recursive = FALSE)\n        }\n        eval(aob, env)\n    }\n}) at replot_xts.R#235\n4 plot.replot_xts(x, ...) \n3 plot(x, ...) at replot_xts.R#207\n2 print.replot_xts(<environment>) \n1 print(<environment>) \n\nDespite the error, the line is drawn correctly.\n\nIs there a better way to overlay a transformation of a line onto the line in a multi.panel series?  Maybe I haven't discovered it yet...\n\npcc\n\nFollowups:\n\nDate: 2014-08-14 20:50\nSender: Peter Carl\nI now see that although the line is drawn correctly, there's no legend."},"comment":{"url":"https://api.github.com/repos/joshuaulrich/xtsExtra/issues/comments/81497526","html_url":"https://github.com/joshuaulrich/xtsExtra/issues/9#issuecomment-81497526","issue_url":"https://api.github.com/repos/joshuaulrich/xtsExtra/issues/9","id":81497526,"user":{"login":"rossb34","id":5797430,"avatar_url":"https://avatars.githubusercontent.com/u/5797430?v=3","gravatar_id":"","url":"https://api.github.com/users/rossb34","html_url":"https://github.com/rossb34","followers_url":"https://api.github.com/users/rossb34/followers","following_url":"https://api.github.com/users/rossb34/following{/other_user}","gists_url":"https://api.github.com/users/rossb34/gists{/gist_id}","starred_url":"https://api.github.com/users/rossb34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossb34/subscriptions","organizations_url":"https://api.github.com/users/rossb34/orgs","repos_url":"https://api.github.com/users/rossb34/repos","events_url":"https://api.github.com/users/rossb34/events{/privacy}","received_events_url":"https://api.github.com/users/rossb34/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T08:28:25Z","updated_at":"2015-03-16T08:28:25Z","body":"Unable to replicate this error. I am able to add lines to multi-panel plots."}}