Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

yerrorbars style

1,080 views
Skip to first unread message

Olafur Jens Sigurdsson

unread,
Jan 28, 2008, 8:25:24 AM1/28/08
to
Hi, I am trying to plot two sets of data in the same file with
errorbars and I am using the follwing command to do so:

plot hbar*g*1000*(1+4*x**2)/(8*abs(x))/kb, "data" u ($9/80):1:5 w yerr \
pt 3 , "data" u ($9/80):2:6 w yerr pt 3

I have defined the constants there beforehand.

This produces errorbars around the data points with dashed lines
instead of a solid line. This can be fixed by not defining the pt
style but then it is difficult to tell the end of the error bars from
the data points since the two data are pretty close to each other.

So my question is, how do I make gnuplot plot the errorbars with the
data points as stars and the lines in the errorbars as solids and with
different colors.

Thanks.

Oli

Olafur Jens Sigurdsson

unread,
Jan 28, 2008, 9:51:51 AM1/28/08
to

A little bit more information.

These dashed lines do not show when I print the file normally (in a
wxt terminal with 0 options) but when I use

set term postscript eps enhanced color

and print out the graph to an eps file then I see these dashed lines
in the error bars.

Thanks.

Oli

Ethan Merritt

unread,
Jan 28, 2008, 12:10:39 PM1/28/08
to
In article <slrnfprlu...@laserlabd.fys.ku.dk>,

Olafur Jens Sigurdsson <o...@klaki.net> wrote:
>Hi, I am trying to plot two sets of data in the same file with
>errorbars and I am using the follwing command to do so:
>
>plot hbar*g*1000*(1+4*x**2)/(8*abs(x))/kb, "data" u ($9/80):1:5 w yerr \
>pt 3 , "data" u ($9/80):2:6 w yerr pt 3
>
>I have defined the constants there beforehand.
>
>This produces errorbars around the data points with dashed lines
>instead of a solid line. This can be fixed by not defining the pt
>style but then it is difficult to tell the end of the error bars from
>the data points since the two data are pretty close to each other.

I do not recognize this description, but...

>So my question is, how do I make gnuplot plot the errorbars with the
>data points as stars and the lines in the errorbars as solids and with
>different colors.

Maybe you could use the "candlesticks" plot type.
See
http://gnuplot.sourceforge.net/demo/candlesticks.html

--
Ethan A Merritt

Hans-Bernhard Bröker

unread,
Jan 28, 2008, 5:27:14 PM1/28/08
to
Olafur Jens Sigurdsson wrote:
> Hi, I am trying to plot two sets of data in the same file with
> errorbars and I am using the follwing command to do so:
>
> plot hbar*g*1000*(1+4*x**2)/(8*abs(x))/kb, "data" u ($9/80):1:5 w yerr \
> pt 3 , "data" u ($9/80):2:6 w yerr pt 3
>
> I have defined the constants there beforehand.
>
> This produces errorbars around the data points with dashed lines
> instead of a solid line.

That would be because your terminal setting has patterned linetypes (no
"solid" option to the postscript driver), and the errorbars have
linetype 2 and 3, which happen to be dashed.

> So my question is, how do I make gnuplot plot the errorbars with the
> data points as stars and the lines in the errorbars as solids and with
> different colors.

By actually specifying the colour, i.e. the linetype.

Olafur Jens Sigurdsson

unread,
Jan 30, 2008, 7:36:10 AM1/30/08
to

Ok, I tried all different linetypes and most of them give me a dashed
errorbar line (only lt -1 and lt 1 dont give me a solid line).

That is not good enough for me, I would like to be able to select from
all the colors available and get the errobarlines as solid.

Any more ideas?

Cheers

Oli

Olafur Jens Sigurdsson

unread,
Jan 30, 2008, 11:55:43 AM1/30/08
to
On 2008-01-28, Hans-Bernhard Bröker <HBBr...@t-online.de> wrote:

Ahhh, solved it by adding the solid option to the term setting:

set term postscript eps enhanced color solid

by default it uses the dash setting, silly gnuplot :-)

Cheers.

Oli

0 new messages