{"action":"created","issue":{"url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/issues/4","labels_url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/issues/4/comments","events_url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/issues/4/events","html_url":"https://github.com/Evizero/UnicodePlots.jl/issues/4","id":101668693,"number":4,"title":"Feature requests","user":{"login":"dpo","id":38760,"avatar_url":"https://avatars.githubusercontent.com/u/38760?v=3","gravatar_id":"","url":"https://api.github.com/users/dpo","html_url":"https://github.com/dpo","followers_url":"https://api.github.com/users/dpo/followers","following_url":"https://api.github.com/users/dpo/following{/other_user}","gists_url":"https://api.github.com/users/dpo/gists{/gist_id}","starred_url":"https://api.github.com/users/dpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpo/subscriptions","organizations_url":"https://api.github.com/users/dpo/orgs","repos_url":"https://api.github.com/users/dpo/repos","events_url":"https://api.github.com/users/dpo/events{/privacy}","received_events_url":"https://api.github.com/users/dpo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/milestones/1","html_url":"https://github.com/Evizero/UnicodePlots.jl/milestones/Version%200.0.2","labels_url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/milestones/1/labels","id":1260738,"number":1,"title":"Version 0.0.2","description":"","creator":{"login":"Evizero","id":10854026,"avatar_url":"https://avatars.githubusercontent.com/u/10854026?v=3","gravatar_id":"","url":"https://api.github.com/users/Evizero","html_url":"https://github.com/Evizero","followers_url":"https://api.github.com/users/Evizero/followers","following_url":"https://api.github.com/users/Evizero/following{/other_user}","gists_url":"https://api.github.com/users/Evizero/gists{/gist_id}","starred_url":"https://api.github.com/users/Evizero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evizero/subscriptions","organizations_url":"https://api.github.com/users/Evizero/orgs","repos_url":"https://api.github.com/users/Evizero/repos","events_url":"https://api.github.com/users/Evizero/events{/privacy}","received_events_url":"https://api.github.com/users/Evizero/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2015-08-18T14:39:52Z","updated_at":"2015-08-18T22:30:22Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-08-18T14:22:52Z","updated_at":"2015-08-18T23:01:35Z","closed_at":null,"body":"Thanks for a great plotting package. Thousands of times faster than anything else out there for Julia!\r\n\r\nHere are a few feature requests:\r\n1. add stair plots one by one (`stairs!()`)\r\n2. a `spy()` function to plot sparsity patterns\r\n3. add axis labels in addition to \"ticks\"\r\n4. add `:bc` (bottom center) location (and perhaps `:tc` (top center))\r\n5. colored annotations (e.g., for colored legends)\r\n\r\nHere's the first feature:\r\n```JULIA\r\nfunction lineplot!{T <: Canvas, F <: Real, R <: Real}(plot :: Plot{T}, X :: Vector{F}, Y :: Vector{R}; color::     Symbol=:white, args...)\r\n  X = convert(Vector{FloatingPoint},X)\r\n  Y = convert(Vector{FloatingPoint},Y)\r\n  drawLine!(plot, X, Y, color)\r\nend\r\n\r\nfunction stairs!{T <: Canvas, F <: Real, R <: Real}(plot :: Plot{T}, X :: Vector{F} , Y :: Vector{R}; args...)\r\n  xVec = zeros(length(X) * 2- 1)\r\n  yVec = zeros(length(X) * 2 - 1)\r\n  xVec[1] = X[1]\r\n  yVec[1] = Y[1]\r\n  o = 0 \r\n  for i = 2:(length(X))\r\n    xVec[i + o] = X[i]\r\n    xVec[i + o + 1] = X[i]\r\n    yVec[i + o] = Y[i-1]\r\n    yVec[i + o + 1] = Y[i]\r\n    o += 1\r\n  end \r\n  lineplot!(plot, xVec, yVec; args...)\r\nend\r\n```\r\n\r\nAnd here's a primitive `spy()`:\r\n```JULIA\r\nfunction spy(A :: SparseMatrixCSC, args...)\r\n  rows, cols, vals = findnz(A)\r\n  nrow, ncol = size(A)\r\n  canvas = BrailleCanvas(40, int(20 * nrow / ncol),\r\n                         plotWidth=float(ncol)+1, plotHeight=float(nrow)+1)\r\n  spyplot = Plot(canvas, args...)\r\n  setPoint!(spyplot,\r\n            convert(Vector{FloatingPoint}, cols),\r\n            nrow + 1 - convert(Vector{FloatingPoint}, rows),\r\n            :green)                                                                                                \r\n  return spyplot\r\nend\r\n```\r\n\r\n![screen shot 2015-08-18 at 10 20 41](https://cloud.githubusercontent.com/assets/38760/9332501/d6871bcc-4592-11e5-957b-6886226514a3.PNG)\r\n"},"comment":{"url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/issues/comments/132385547","html_url":"https://github.com/Evizero/UnicodePlots.jl/issues/4#issuecomment-132385547","issue_url":"https://api.github.com/repos/Evizero/UnicodePlots.jl/issues/4","id":132385547,"user":{"login":"waldyrious","id":478237,"avatar_url":"https://avatars.githubusercontent.com/u/478237?v=3","gravatar_id":"","url":"https://api.github.com/users/waldyrious","html_url":"https://github.com/waldyrious","followers_url":"https://api.github.com/users/waldyrious/followers","following_url":"https://api.github.com/users/waldyrious/following{/other_user}","gists_url":"https://api.github.com/users/waldyrious/gists{/gist_id}","starred_url":"https://api.github.com/users/waldyrious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldyrious/subscriptions","organizations_url":"https://api.github.com/users/waldyrious/orgs","repos_url":"https://api.github.com/users/waldyrious/repos","events_url":"https://api.github.com/users/waldyrious/events{/privacy}","received_events_url":"https://api.github.com/users/waldyrious/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T23:01:35Z","updated_at":"2015-08-18T23:01:35Z","body":"Since this issue covers multiple feature requests, I thought I'd add this [neat summary](http://blog.leahhanson.us/using-asciiplotsjl.html) by @astrieanna of what ASCIIPlots.jl can do (since its README isn't that comprehensive). It might provide some additional ideas :) particularly the \"Heat Map\" section near the end, since I've seen this is already planned for UnicodePlots according to the README. The Conclusion section contains a bunch of other ideas, some of which could make sense here."}}