gnuplot

Error in Weibull distribution

那年仲夏 提交于 2019-12-24 13:38:30
问题 file.data has the following values to fit with Weibull distribution, x y 2.53 0.00 0.70 0.99 0.60 2.45 0.49 5.36 0.40 9.31 0.31 18.53 0.22 30.24 0.11 42.23 Following the Weibull distribution function f(x)=1.0-exp(-lambda*x**n) , it is giving error: fit f(x) 'data.dat' via lambda, n and finally plotting f(x) and xy graph have large discrepancy. Any feedback would be highly appreciated. Thanks! 回答1: Several things: You must skip the first line (if it really is x y ). You must use the correct

gnuplot: extract x-values from string in data

让人想犯罪 __ 提交于 2019-12-24 13:17:14
问题 My data files look like this: c0e0100.dat 0.234 c0e0200.dat 0.857 ... c0e1200.dat 0.003 I would like to extract the x-values from the 4th to 7th character of the filenames in the first column. I tried the following user function: str2num(s)=(s[4:7]+0.0) and then: plot 'file' using (str2num($1)):($2) but this gives: internal error: substring range operator applied to non-STRING type I also tried: plot 'file' using (str2num(stringcolumn($1))):($2) but got the same result. Is there a way of

Plot 3D line on top of surface plot in Octave

﹥>﹥吖頭↗ 提交于 2019-12-24 11:53:27
问题 I have plotted a surface from some data. In the same plot I want to have a 3D line (I have the [x,y,z] values for the line I want to plot). When I try to do this using plot3(x,y,z) in the same figure, the line is always below the surface. Is there any way to fix this? I don't know if this problem appears in Matlab as well. Minimal example: figure; hold all; y = x = 0:35; z = ones(1,36).*0.5; plot3(x,y,z); [X,Y] = meshgrid(-8:.5:8); R = sqrt(X.^2 + Y.^2) + eps; Z = sin(R)./R; surf(Z); The

Changing ytic font size in gnuplot epslatex (multiplot)

偶尔善良 提交于 2019-12-24 11:37:23
问题 I have problems changing the font size of my ytics (xtics as well) in an epslatex gnuplot. I tried set format y '\tiny{%g}' It is only working for the first of the two plots. This is my code: set terminal epslatex set output "w_alt_nsyB_multi.tex" set multiplot layout 1,1 set xrange [-0.5:17] set yrange [0:110] set xlabel "days" set ylabel "Survival (\\%)" offset 2.5 set key reverse set xtics font 'Arial,4' s et style histogram errorbars gap 2 lw 1 set style data histogram set style fill

gnuplot: how to get correct order of magnitude?

廉价感情. 提交于 2019-12-24 11:28:24
问题 This question/issue is maybe related somehow to this topic. If you type: print log10(1e7) you will get 7.0 . print int(log10(1e7)) you will get 7 . However, if you type print log10(1e6) you will get 6.0 . print int(log10(1e6)) you will get 5 . These are probably rounding errors related to log10 and cannot(?) be avoided. Because if you type print sprintf("%.20e",log10(1e6)) gives 5.99999999999999911182e+00 print sprintf("%.20e",log10(1e7)) gives 7.00000000000000000000e+00 You can extend and

gnuplot-iostream not linking to boost

心已入冬 提交于 2019-12-24 10:56:22
问题 Hi I'm trying to use gnuplot-iostream, at the minute I'm just trying to get the code here working. When I try to combile I get errors in the linker saying: In function `stream<int, boost::iostreams::file_descriptor_flags>': /usr/include/boost/iostreams/stream.hpp:130: undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(int, boost::iostreams::file_descriptor_flags)' In function `boost::iostreams::file_descriptor_sink boost::iostreams::detail::wrap<boost:

Scatter Plot will not change color

丶灬走出姿态 提交于 2019-12-24 09:58:40
问题 I'm trying to change the color of the points on my 3D Scatter Plot. The points change to black, not the color I want and the point on the key changes to the correct color. Does anyone know why this occurs? import com.panayotis.gnuplot.JavaPlot; import com.panayotis.gnuplot.plot.*; import com.panayotis.gnuplot.style.NamedPlotColor; import com.panayotis.gnuplot.style.PlotStyle; import com.panayotis.gnuplot.style.Style; public class ScatterPlot4D { public static void main(String[] args) { int

Variable transparency is possible in Gnuplot?

試著忘記壹切 提交于 2019-12-24 09:13:54
问题 I want to plot a filled circle in Gnuplot, but with transparency changing with the distance to the center of the circle, i.e. a transparency gradient (solid near to the center, and transparent near to the radius of circle). Is there any way of doing this in Gnuplot? Thank you in advance! 回答1: One option would be to define a custom function describing the gradient (e.g., a Gaussian) and then use pm3d map to visualize it: set terminal pngcairo size 400,400 set output 'fig.png' unset border

Gnuplot: connecting two data with line at a certain point from different data files

浪尽此生 提交于 2019-12-24 08:49:51
问题 This question is an extension of a previously answered one. I want a graph using gnuplot with two data in mixed scheme. This is a data consisting of 3 columns: #x y1 y2 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 1 7 0 1 8 0 1 9 0.1 1.2 10 0.1 1.23 What I want is that one line draws without seam. e.g. From x=1 to x=5, use y1 value, then from x=6 to x=10 use y2 value. And, all the points are connected with one single line. Does any body know how to make it with simple gnuplot command? One more related

gnuplot xticks not equally spaced

本秂侑毒 提交于 2019-12-24 07:07:26
问题 I have a data file (d.asc) as follows: 0.1 0.5 ... 1 0.34 ... 10 9.4 ... 100 45.3 In between 0.1 and 1, 1 and 10, 10 and 100 I have 35 values. So that in total in d.asc file I have 109 lines. But I just want x-axis to display these four point values (i.e. 0.1, 1, 10, and 100). To plot it I use the following: set xtics ("0.1" 0.1, "1" 1, "10" 10, "100" 100) set grid plot "d.asc" using 1:2 notitle with lines But this gives something weird, it places 1 and 10 very close to 0.1 (kind of