Gnuplot Solid Error Bars
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads gnuplot error bars style with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the gnuplot set bars Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: error bars gnuplot Sign up Gnuplot types of error bars up vote 3 down vote favorite 1 Can we change the type of line used by gnuplot in the errorbars? This is my gnuplot code: set terminal postscript eps color set output '| epstopdf gnuplot boxerrorbars --filter --outfile=plot.pdf' set xlabel "Simulation days" set xtics nomirror set ylabel "Time (seconds)" set ytics nomirror set logscale y set key left top plot "data1.csv" using 1:($2/1000):($3/1000) with yerrorbars pt 5,\ "data2.csv" using 1:($2/1000):($3/1000) with yerrorbars pt 7 The error bars from the first plot are different from the second one. The first line is solid, but the second is dotted. Its possible to define the style of the error bar? plot gnuplot share|improve this question asked Jun 9 '14 at 9:22 mariolpantunes
Candlesticks Gnuplot
597822 Oh, wow, did not know about the output '| ...'. +1 for teaching me that :) –Bernhard Jun 10 '14 at 15:01 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted In your case, the easiest option is to use the solid terminal option to have only solid lines: set terminal postscript eps color solid lw 3 set output '| epstopdf --filter --outfile=plot.pdf' set samples 10 set xrange [0:10] unset key plot '+' using 1:1:(0.2*$1) w yerrorbars, \ '' using 1:(1.5*$1):(0.1*$1) w yerrorbars Result with 4.6.4: Alternatively, you can use lt 1 lc 2 for the second plot, which selects the line pattern of the first linetype (which is solid), and the color of the second one: plot '+' using 1:1:(0.2*$1) w yerrorbars, \ '' using 1:(1.5*$1):(0.1*$1) lt 1 lc 2 w yerrorbars share|improve this answer answered Jun 9 '14 at 9:31 Christoph 29.5k72847 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged plot gnuplot or ask your own question. asked 2 years ago viewed 3441 times active 2 years ago Related 0gnuplot: Points overlap in pm3d with a wide xrange1G
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting
Gnuplot Standard Deviation
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the gnuplot no title Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a gnuplot colors minute: Sign up gnuplot: yerrorbars with linecolor variable up vote 1 down vote favorite I want to draw yerrorbars with different colors. I am able to draw points with different colors using the following code: reset plot "-" using 1:2:3 with http://stackoverflow.com/questions/24117219/gnuplot-types-of-error-bars points linecolor variable # x y linecolor -4.0 -3.8 1 -3.0 -2.9 1 -2.0 -2.1 2 -1.0 -1.2 1 1.0 1.1 1 2.0 2.2 2 3.0 3.3 3 4.0 4.5 3 end But I am not sure how to extend this to yerrrorbars. When I try and use the following code, the errorbars are colored only with default color. How do I color the errorbars with a specific color? reset plot "-" using 1:2:($1-$2) with yerrorbars linecolor variable # x y linecolor -4.0 http://stackoverflow.com/questions/9172219/gnuplot-yerrorbars-with-linecolor-variable -3.8 1 -3.0 -2.9 1 -2.0 -2.1 2 -1.0 -1.2 1 1.0 1.1 1 2.0 2.2 2 3.0 3.3 3 4.0 4.5 3 end I found a way to do this by separating the data and then plotting it. But if there is a way without separating the data it would be a nicer solution. reset plot "-" using 1:2:($1-$2) with yerrorbars lc 1, \ "-" using 1:2:($1-$2) with yerrorbars lc 2, \ "-" using 1:2:($1-$2) with yerrorbars lc 3 # x y -4.0 -3.8 -3.0 -2.9 -1.0 -1.2 1.0 1.1 end -2.0 -2.1 2.0 2.2 end 3.0 3.3 4.0 4.5 end gnuplot share|improve this question edited Feb 7 '12 at 7:21 asked Feb 7 '12 at 7:01 Anand 54511129 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote "using" specifies which columns will be the input for the command. So since your third column is linecolor, and yerrorbars linecolor expects the fourth column to be the line color, you need to specify using 1:2:($1-$2):3. So, this is the corrected version of your example: reset plot "-" using 1:2:($1-$2):3 with yerrorbars linecolor variable # x y linecolor -4.0 -3.8 1 -3.0 -2.9 1 -2.0 -2.1 2 -1.0 -1.2 1 1.0 1.1 1 2.0 2.2 2 3.0 3.3 3 4.0 4.5 3 end share|improve this answer answered Sep 18 '14 at 13:57 Froggy 215 add a comment| up vote 0 down vote The problem is, that the third column ($1 -
sometimes you cannot process it with the TeX system because a computer memory is not enough. An easy way to include your graph into the TeX document, make the graph in http://folk.uio.no/hpl/scripting/doc/gnuplot/Kawano/postproc-e.html an EPS format and use the LaTeX graphics (graphicx) package. Firstly, make a figure with gnuplot, and use the enhanced EPS terminal to make an EPS file. gnuplot> set term postscript eps enhanced gnuplot> set output "test.eps" gnuplot> set key left top gnuplot> set size 0.5,0.5 gnuplot> set xrange [0:4] gnuplot> set yrange [0:4] gnuplot> set xlabel "Energy [MeV]" gnuplot> set ylabel "Cross Section [b]" gnuplot> set linestyle 1 lt 1 gnuplot> set linestyle 2 lt error bars 1 pt 7 gnuplot> plot 0.2536*x+1.1717 title "LESQ fit" \ > with lines linestyle 1,\ > "test.dat" usi 1:2:3 title "data" \ > with yerrorbars linestyle 2 If you don't change the figure size, letters in the generated EPS become too small in comparison with the graph. To make them larger, use the set term option to specify the larger font, or use the set size command to make the whole figure smaller, just like gnuplot solid error the example above. The font size is the same even you change the size of figure, so that the letters become larger relative to the graph. When symbols in your figure have error bars, the PostScript driver draws the bars with the specified line type. If those are not the number 1 (solid line), gnuplot the error bars with draws dotted or dashed lines. To avoid this, use linestyle to set the linetype lt=1 and change the symbol number pt. To paste a graph in your TeX(LaTeX2e) document, use graphics package. \includegraphics{ EPS file } command inserts the figure at that location. The EPS file name is specified at EPS file. If you want to chance the figure size, use \resizebox{X size}{Y size} command, which enlarges or shrinks the figure size. If you want to keep the aspect ratio, put "!" into the X or Y size. In the next example, a figure is inserted into the figure environment, a caption is given, and the figure width is set to 120mm. \documentclass{article} \usepackage{graphics} \begin{document} \begin{figure} \begin{center} \resizebox{120mm}{!}{\includegraphics{test.eps}} \caption{This is a sample figure.} \label{test} \end{center} \end{figure} \end{document} I want to merge several figures into one figure. There are several ways to merge some figures, for example, use multiplot, combine EPS figures into one drawing. Maybe the simplest way to do is to use a LaTeX tabula