graphing

Graphing routines in Tcl/Tk

ぃ、小莉子 提交于 2019-12-22 11:33:04
问题 I want to do simple graphing routines in Tcl/Tk like scatter plot, x-y plot, histograms. I am using Tcl/Tk 8.5.7. I found in Tcler's wiki that there are few options such as BLT which is not supported in Tcl/Tk 8.5+ Is there any Tcl/Tk interface to gnuplot or any widget to accomplish graphing? Please let me know about the choices for graphing routines in Tcl/Tk. 回答1: Gnuplot can indeed produce output that Tcl/Tk can consume. This page on the Tcler's Wiki describes how (though with some extra

Reading and graphing data read from huge files

对着背影说爱祢 提交于 2019-12-21 17:26:42
问题 We have pretty large files, the order of 1-1.5 GB combined (mostly log files) with raw data that is easily parseable to a csv, which is subsequently supposed to be graphed to generate a set of graph images. Currently, we are using bash scripts to turn the raw data into a csv file, with just the numbers that need to be graphed, and then feeding it into a gnuplot script. But this process is extremely slow. I tried to speed up the bash scripts by replacing some piped cut s, tr s etc. with a

Cubic Hermite Spline behaving strangely

丶灬走出姿态 提交于 2019-12-21 13:39:46
问题 I'm attempting to draw a graph using Cubic Hermite Splines. I grabbed the simple code to do so from this interpolation methods page. Here is my code: private float HermiteInterpolate(float y0, float y1, float y2, float y3, float mu) { var mu2 = mu * mu; var a0 = -0.5f * y0 + 1.5f * y1 - 1.5f * y2 + 0.5f * y3; var a1 = y0 - 2.5f * y1 + 2f * y2 - 0.5f * y3; var a2 = -0.5f * y0 + 0.5f * y2; var a3 = y1; return (a0 * mu * mu2) + (a1 * mu2) + (a2 * mu) + a3; } With this data (y-values, from 0-1, x

How can I make “real-time” plots with wxMathPlot?

北慕城南 提交于 2019-12-21 05:47:13
问题 I am thinking of using wxMathPlot for plotting/graphing some data that arrives continuously. I want to draw "Real-time" plot/graph using it. Is that possible? I.E. I don't want just a static graph of a one-time read of a file - I want the streaming data plotted and continued out to the right of the graph - (and let the left side fall off/scroll out of view) EDIT I still have not gotten an answer for this. There is an interesting class in the wxmathPlot library called mpFXYVector but that

matlab: putting a circled number onto a graph

眉间皱痕 提交于 2019-12-21 04:55:28
问题 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

Graphing slow counters with prometheus and grafana

本小妞迷上赌 提交于 2019-12-20 10:11:37
问题 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

Python plotting error bars with different values above and below the point

爱⌒轻易说出口 提交于 2019-12-18 22:36:52
问题 Warning: I'm very new to using python. I'm trying to graph data using error bars but my data has different values for the error above and below the bar, i.e. 2+.75,2-.32. import numpy as np import matplotlib.pyplot as plt # example data x = (1,2,3,4) y = (1,2,3,4) # example variable error bar values yerr = 0.2 plt.figure() plt.errorbar(x, y, yerr,"r^") plt.show() But I want the error bar above the point to be a specific value like .17 and below the point to be a specific point like .3 Does

Python plotting error bars with different values above and below the point

柔情痞子 提交于 2019-12-18 22:36:07
问题 Warning: I'm very new to using python. I'm trying to graph data using error bars but my data has different values for the error above and below the bar, i.e. 2+.75,2-.32. import numpy as np import matplotlib.pyplot as plt # example data x = (1,2,3,4) y = (1,2,3,4) # example variable error bar values yerr = 0.2 plt.figure() plt.errorbar(x, y, yerr,"r^") plt.show() But I want the error bar above the point to be a specific value like .17 and below the point to be a specific point like .3 Does

Use image instead of labels in ggplot2 legend

五迷三道 提交于 2019-12-18 10:56:06
问题 I have a plot in ggplot2 with, say, 2 lines, and in the legend I have "Sharks" and "Tigers". Is there a way I could have shark/tiger images appear in the legend instead of that text? 回答1: You're much better off using ggsave to save the figure as a eps or svg , then opening it in Illustrator (or open source equivalent) and replacing the legend with the images. If you're really dead set on doing it all in R, you can use annotation_raster in the current ggplot2 and add in some text next to it

JFreeChart Date axis Formatting issue

北城以北 提交于 2019-12-18 08:58:48
问题 I have a time series chart. I have my x-axis as a Date, and the Y-axis are just numbers. I am trying to format the date on the x-axis, however I keep getting exceptions. My code is below: TimeSeries trueSeries = new TimeSeries("True Data"); TimeSeries regressionSeries = new TimeSeries("Regression Line"); TimeSeries averageSeries = new TimeSeries("Moving Average"); for (Date date : regression.keySet()) { Calendar cal = Calendar.getInstance(); cal.setTime(date); int month = cal.get(Calendar