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

Plot a simple point?

6,286 views
Skip to first unread message

saneman

unread,
Aug 18, 2008, 10:49:38 AM8/18/08
to
Is there a way to plot a simple 2D point (8,6) without reading it from a
.dat file? I have tried:

plot 8 6 with points

but it gives an error.


Dan Hatton

unread,
Aug 18, 2008, 11:47:34 AM8/18/08
to

set parametric
plot 8.0,6.0 with points

--

HTH,

Dan Hatton

<http://www.bib.hatton.btinternet.co.uk/dan/>

Michael Kopp

unread,
Aug 18, 2008, 11:52:06 AM8/18/08
to
Hi,

plot '-' w points
8 6
e

see 'help special'

HTH,

Michael.

mer...@chauvet.bmsc.washington.edu

unread,
Aug 18, 2008, 12:06:50 PM8/18/08
to
In article <48a98bf5$0$90262$1472...@news.sunsite.dk>,

saneman <as...@asd.com> wrote:
>Is there a way to plot a simple 2D point (8,6) without reading it from a
>.dat file? I have tried:
>
>plot 8 6 with points

The generic "set label" command produces a point with a label attached.
You can give it a blank label.

set label 1 "" at 8,6 point pointtype <n>

--
Ethan A Merritt

saneman

unread,
Aug 18, 2008, 3:16:45 PM8/18/08
to
I have now made a test.dat file containing:

8 6
5 10
10 14
16 14
18 11
18 7
16 6

when I do:

plot "test.dat" using 1:2 w points


each point is plotted. I would like to have some text above each point. Is
that possible?

Currently the points are plotted as red crosses, but is it possible to plot
them as small filled or unfilled circles instead?


"Dan Hatton" <vi5u0-...@yahoo.co.uk> skrev i en meddelelse
news:alpine.LFD.1.10.0...@seagull.bpi.cam.ac.uk...

mer...@chauvet.bmsc.washington.edu

unread,
Aug 18, 2008, 5:30:39 PM8/18/08
to
In article <48a9ca97$0$90262$1472...@news.sunsite.dk>,

saneman <as...@asd.com> wrote:
>
>when I do:
>plot "test.dat" using 1:2 w points
>
>each point is plotted. I would like to have some text above each point. Is
>that possible?

Certainly. See for example
http://gnuplot.sourceforge.net/demo_4.2/datastrings.html

>Currently the points are plotted as red crosses, but is it possible to plot
>them as small filled or unfilled circles instead?

Check the output of the "test" command for whatever terminal type
you are using. Different output devices support different point shapes.
For many terminal types, filled and unfilled circles are point types
7 and 6 respectively.

>
>"Dan Hatton" <vi5u0-...@yahoo.co.uk> skrev i en meddelelse
>news:alpine.LFD.1.10.0...@seagull.bpi.cam.ac.uk...
>> On Mon, 18 Aug 2008, saneman wrote:
>>
>>> Is there a way to plot a simple 2D point (8,6) without reading it from a
>>> .dat file? I have tried:
>>>
>>> plot 8 6 with points
>>>
>>> but it gives an error.
>>
>> set parametric
>> plot 8.0,6.0 with points
>>
>> --
>>
>> HTH,
>>
>> Dan Hatton
>>
>> <http://www.bib.hatton.btinternet.co.uk/dan/>
>
>


--
Ethan A Merritt

saneman

unread,
Aug 18, 2008, 6:05:28 PM8/18/08
to

<mer...@chauvet.bmsc.washington.edu> skrev i en meddelelse
news:g8cplv$nlb$1...@chauvet.bmsc.washington.edu...

> In article <48a9ca97$0$90262$1472...@news.sunsite.dk>,
> saneman <as...@asd.com> wrote:
>>
>>when I do:
>>plot "test.dat" using 1:2 w points
>>
>>each point is plotted. I would like to have some text above each point. Is
>>that possible?
>
> Certainly. See for example
> http://gnuplot.sourceforge.net/demo_4.2/datastrings.html
>

I have tried to plot the text P_0 at (5,5) with

set label 2 "P_0" at graph 5,5

but nothing shows up.


>>Currently the points are plotted as red crosses, but is it possible to
>>plot
>>them as small filled or unfilled circles instead?
>
> Check the output of the "test" command for whatever terminal type
> you are using. Different output devices support different point shapes.
> For many terminal types, filled and unfilled circles are point types
> 7 and 6 respectively.


For viewing I am using the windows terminal, but when I write to eps I use
postscript terminal which in the help
file has the following options:


set terminal postscript {default}
set terminal postscript {landscape | portrait | eps}
{enhanced | noenhanced}
{defaultplex | simplex | duplex}
{fontfile [add | delete] "<filename>"
| nofontfiles}

{level1 | leveldefault}
{color | colour | monochrome}
{solid | dashed}
{dashlength | dl <DL>}
{linewidth | lw <LW>}
{rounded | butt}
{palfuncparam <samples>{,<maxdeviation>}}
{size <XX>{unit},<YY>{unit}}

{blacktext | colortext | colourtext}
{{font} "fontname{,fontsize}" {<fontsize>}}

But I don't see where the different point styles are listed.

Michael Kopp

unread,
Aug 19, 2008, 4:03:44 AM8/19/08
to
Hi,

>
> For viewing I am using the windows terminal, but when I write to eps I use
> postscript terminal which in the help
> file has the following options:
...

> But I don't see where the different point styles are listed.

You choose them in the plot command:

plot "file.dat" u 1:2 w points pt 7

gives closed circles.


The following overview might be helpful, too:

http://commons.wikimedia.org/wiki/Image:Ps_symbols_bw.png

(You can create this image yourself by running the gnuplot script
ps_symbols.gpi, which should be somewhere on your system).

HTH,

Michael.

Lionel B

unread,
Aug 19, 2008, 4:27:35 AM8/19/08
to
On Tue, 19 Aug 2008 00:05:28 +0200, saneman wrote:

> <mer...@chauvet.bmsc.washington.edu> skrev i en meddelelse
> news:g8cplv$nlb$1...@chauvet.bmsc.washington.edu...
>> In article <48a9ca97$0$90262$1472...@news.sunsite.dk>, saneman
>> <as...@asd.com> wrote:

[...]

> I have tried to plot the text P_0 at (5,5) with
>
> set label 2 "P_0" at graph 5,5
>
> but nothing shows up.

No, because graph 5,5 is off the plotting area (try graph 0.5,0.5
instead). See:

help coordinates

>>> Currently the points are plotted as red crosses, but is it possible to
>>> plot them as small filled or unfilled circles instead?
>>
>> Check the output of the "test" command for whatever terminal type you
>> are using. Different output devices support different point shapes.
>> For many terminal types, filled and unfilled circles are point types 7
>> and 6 respectively.
>
> For viewing I am using the windows terminal, but when I write to eps I

> use postscript terminal [...] But I don't see where the different point
> styles are listed.

As Ethan said: do e.g.

set term postscript eps
set out "test.eps"
test
set out

then look at test.eps.

Cheers,

--
Lionel B

saneman

unread,
Aug 19, 2008, 5:06:41 AM8/19/08
to
Thanks! That was just what I was looking for!


"Michael Kopp" <michae...@gmx.de> skrev i en meddelelse
news:48aa7e60$0$28520$3b21...@usenet.univie.ac.at...

0 new messages