graphing

How can I make a stepline or stepped chart in chart.js or D3?

五迷三道 提交于 2019-12-05 05:06:26
I'm able to accomplish this in Google Spreadsheets, below is a screenshot: Here's the small dataset in CSV Buy PPU,Sell PPU,Net PPU 0.023,0.019,-0.000725 0.026,0.0165,-0.003725 0.021,0.021,0.00735 0.015,0.0165,0.0147 0.021,0.028,0.0168 0.018,0.028,0.0198 jsFiddle with basic configuration: http://jsfiddle.net/kaatula/j3FJf/1/ Chart.js documentation: http://www.chartjs.org/docs/ D3 documentation: http://strongriley.github.io/d3/api/ Any help is appreciated. I'm not seeing an example in either library of this specific kind of chart (called I believe "Stepped" or "Step line"), but I believe they

Force-directed graphing

余生长醉 提交于 2019-12-04 21:24:39
I'm trying to write a force-directed or force-atlas code base for a graphing application I'm building for myself. Here is an example of what I'm attempting: http://sawamuland.com/flash/graph.html I managed to find some pseudo code to accomplish what I'd like on the Wiki Force-atlas article. I've converted this into ActionScript 3.0 code since it's a Flash application. Here is my source: var timestep:int = 0; var damping:int = 0; var total_kinetic_engery:int = 0; for (var node in list) { var net_force:int = 0; for (var other_node in list) { net_force += coulombRepulsion(node, other_node,

javascript graphing library [closed]

老子叫甜甜 提交于 2019-12-04 17:40:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm looking for a nice graphing library for JavaScript that can handle the following types of graphs: Line Graphs Histograms Scatterplots Motion Charts I've tried Google's Chart Tools but they don't seem to have a nice histogram chart (nor can I get their motion chart to work properly, even served off my Apache

Graphing new users by date in a Rails app using Seer

让人想犯罪 __ 提交于 2019-12-04 16:38:27
I'd like to implement a rolling graph showing new users by day over the last 7 days using Seer. I've got Seer installed: http://www.idolhands.com/ruby-on-rails/gems-plugins-and-engines/graphing-for-ruby-on-rails-with-seer I'm struggling to get my brain around how to implement. I've got an array of the Users I want to plot: @users = User.all( :conditions => {:created_at => 7.days.ago..Time.zone.now}) Can't see the right way to implement the :data_method to roll them up by created_at date. Anyone done this or similar with Seer? Anyone smarter than me able to explain this after looking at the

Plots made with rpy sent to X11 suddenly close?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 01:59:59
问题 I'm using RPy2 to make some plots. The plot shows up but the X11 window immediately disappears. All I'm typing is the following, where CCFS is a data matrix import rpy2.robjects as robjects r = robjects.r pca = r.princomp(CCFS) r.plot(pca,main="Eigenvalues") r.biplot(pca,main="biplot") r['dev.off']() #*EDIT* the problem persists even if I remove this line. Am I failing to include something? I know that there is something to plot because princomp returns a ListVector that isn't null. 回答1: Add

matlab: putting a circled number onto a graph

馋奶兔 提交于 2019-12-03 14:12:26
I want to put a circled number on a graph as a marker near (but not on) a point. Sounds easy, but I also want to be invariant of zoom/aspect ratio changes. Because of this invariant, I can't draw a circle as a line object (without redrawing it upon rescale); if I use a circle marker, I'd have to adjust its offset upon rescale. The simplest approach I can think of is to use the Unicode or Wingdings characters ① ② ③ etc. in a string for the text() function. But unicode doesn't seem to work right, and the following sample only works with ① and not for the other numbers (which yield rectangle

javascript graphing library [closed]

我与影子孤独终老i 提交于 2019-12-03 10:34:26
I'm looking for a nice graphing library for JavaScript that can handle the following types of graphs: Line Graphs Histograms Scatterplots Motion Charts I've tried Google's Chart Tools but they don't seem to have a nice histogram chart (nor can I get their motion chart to work properly, even served off my Apache web server). I'm hoping that there's a decent library out there that can support all of these, however if I must, I may include 2 different libraries (looking at Google Chart Tools, gRafael, flotr, and rgraph right now - none of which seem to include ALL of the requirements I have). I'm

matplotlib set yaxis label size

不问归期 提交于 2019-12-03 05:23:32
问题 How can I change the size of only the yaxis label? Right now, I change the size of all labels using pylab.rc('font', family='serif', size=40) but in my case, I would like to make the y-axis label larger than the x-axis. However, I'd like to leave the tick labels alone. I've tried, for example: pylab.gca().get_ylabel().set_fontsize(60) but I only get: AttributeError: 'str' object has no attribute 'set_fontsize' So, obviously that doesn't work. I've seen lots of stuff for tick sizes, but

Putting newline in matplotlib label with TeX in Python?

爱⌒轻易说出口 提交于 2019-12-03 04:41:11
问题 How can I add a newline to a plot's label (e.g. xlabel or ylabel) in matplotlib? For example, plt.bar([1, 2], [4, 5]) plt.xlabel("My x label") plt.ylabel(r"My long label with $\Sigma_{C}$ math \n continues here") Ideally I'd like the y-labeled to be centered too. Is there a way to do this? It's important that the label have both TeX (enclosed in '$') and the newline. 回答1: Your example is exactly how it's done, you use \n . You need to take off the r prefix though so python doesn't treat it as

Graphing slow counters with prometheus and grafana

╄→尐↘猪︶ㄣ 提交于 2019-12-02 22:53:54
We graph fast counters with sum(rate(my_counter_total[1m])) or with sum(irate(my_counter_total[20s])) . Where the second one is preferrable if you can always expect changes within the last couple of seconds. But how do you graph slow counters where you only have some increments every couple of minutes or even hours? Having values like 0.0013232/s is not very human friendly. Let's say I want to graph how many users sign up to our service (we expect a couple of signups per hour). What's a reasonable query? We currently use the following to graph that in grafana: Query: 3600 * sum(rate(signup