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

changing line width

965 views
Skip to first unread message

Dominique Schreurs

unread,
Oct 25, 1996, 3:00:00 AM10/25/96
to

Hi,

I'm wondering if there is a way to use different line widths for
different curves
on the same plot ? I found that the line width is given by
/gnulinewidth. Is is possible to adapt this value
for the different line styles ?

Please send a copy of your reply to: schr...@imec.be


Thanks,

Dominique

crawford richard

unread,
Oct 25, 1996, 3:00:00 AM10/25/96
to

In message-Id: <3270EE...@imec.be>
Dominique Schreurs <schr...@imec.be> writes:

> I'm wondering if there is a way to use different line widths for
> different curves
> on the same plot ? I found that the line width is given by
> /gnulinewidth. Is is possible to adapt this value


Hmm... You've been peeking at PostScript output generated by gnuplot.

If you are using gnuplot 3.5, you have a limited number of choices (within
gnuplot) for the line width. If you enter the command "test", you will
get a display of some of the settings for your terminal. This includes
the available line types. The first two are the ones used for borders
and grid lines and the like -- you can also use them for plotting.

Each line type shown by 'test' is accompanied by an index. Just append
this to the end of the 'plot' command. There is a similar scheme for
point types, which are also shown by 'test' -- its index should be put
after the line type index. Thus

plot f(x) with lines 3, g(x) with points 0 5

will plot f(x) with a line of type 3 and g(x) with points of type 5.

The most recent releases of gnuplot pre-3.6 have a syntax that allows
you to change the line thickness in a much more general way, but only a
few terminal drivers support it yet.

And, of course, you can also edit the PostScript to change /gnulinewidth
whenever you want to.


Dick Crawford, aka rccra...@lanl.gov

Wei-Bin Chen

unread,
Oct 28, 1996, 3:00:00 AM10/28/96
to

Hi, I have a similar problem. I am using Pre 3.6, patch level 294
for Win95. I can change the linewidth under the windows terminal,
by clicking on the right button and changing the line-style, line-
width within the dialog box. However, I don't know how to do this
in a command line.

Can you be more specific of going around this, as of the version,
terminal (I am interested in latex) and the command line?

Also, does gnuplot has an equivalent of the matlab "hold" command?
i.e. holding the previous graph, including x(y)ranges,etc.? It is
kind of tedious to type/edit all the plots in one line when all you
want is to change one entry in the middle, and the emacs M-f key
doesn't work in Win95 either. Am I asking for too much?...

Thanks a lot.

crawford richard (u60...@rho.lanl.gov) wrote:
: In message-Id: <3270EE...@imec.be>
: Dominique Schreurs <schr...@imec.be> writes:

: > I'm wondering if there is a way to use different line widths for
: > different curves

...

: The most recent releases of gnuplot pre-3.6 have a syntax that allows


: you to change the line thickness in a much more general way, but only a
: few terminal drivers support it yet.

: Dick Crawford, aka rccra...@lanl.gov

Wei-Bin Chen

crawford.richard.

unread,
Oct 28, 1996, 3:00:00 AM10/28/96
to

In message-Id: <551m37$j...@agate.berkeley.edu>
wei...@euler.Berkeley.EDU (Wei-Bin Chen) writes:


The new syntax is

plot ... with linespoints lt 3 lw 4 pt 5 ps 6

which will plot with a line of type 3 (from the display given by "test")
and width 4 times default, connecting points of type 5 (again as shown
by "test") and of size 6 times default.

If I recall the history correctly, the new syntax was installed about
version 305 or so -- I'm pretty sure it was not in place in 294.

And I also don't believe it has yet been installed for the Windows
terminal (but I'm less sure about this -- and can't check, since I don't
use that).

But go ahead and try it -- the worst thing that can happen is that it
won't work.


As far as something like "hold" is concerned, you can always use "save"
to write all the settings into a file and then "load" that in again.
And for single-line changes, most gnuplot installations have some sort
of command-line editting built in.

Good luck,

Dick Crawford, aka rccra...@lanl.gov

David Denholm

unread,
Oct 29, 1996, 3:00:00 AM10/29/96
to

Wei-Bin Chen (wei...@euler.Berkeley.EDU) wrote:
> Hi, I have a similar problem. I am using Pre 3.6, patch level 294
> for Win95. I can change the linewidth under the windows terminal,
> by clicking on the right button and changing the line-style, line-
> width within the dialog box. However, I don't know how to do this
> in a command line.

I don't think you can, at the moment...


> Can you be more specific of going around this, as of the version,
> terminal (I am interested in latex) and the command line?

I don't think it's been done for latex. I have done it for pslatex
in the last few days, but that change is not in pl315 : write if
you want the patch


> Also, does gnuplot has an equivalent of the matlab "hold" command?
> i.e. holding the previous graph, including x(y)ranges,etc.? It is
> kind of tedious to type/edit all the plots in one line when all you
> want is to change one entry in the middle, and the emacs M-f key
> doesn't work in Win95 either. Am I asking for too much?...

well, I just maintain a text file, and load it into gnuplot to do the
plot.

gnuplot does not have a direct equivalent of 'hold' - at least,
not as you describe it.

set xrange ... writeback was a (flawed) attempt to freeze the
ranges. replot only lets you add plots to the (single) stored line.
Perhaps we need an option on plot to _not_ store the resulting line
as the replot line ?


dd
--
david....@isltd.insignia.com
Tel +44 (0)1494 453376 (work) +44 (0)1494 459742 (home)

0 new messages