ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* drawdot fails?
@ 2005-12-18 21:57 David Arnold
  2005-12-18 22:37 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: David Arnold @ 2005-12-18 21:57 UTC (permalink / raw)


All,

I am wondering why my dots are not filled with the drawdot command.

\startuseMPgraphic{yeqx2}
   %define function
   vardef f(expr x)=
     x*x
   enddef;
   %define clipping path
   path cpath;
   cpath:=(-5,-5)--(5,-5)--(5,5)--(-5,5)--cycle;
   %create function path
   path p; p:=(-5,f(-5));
   for x=-5 step .1 until 5:
     p:=p--(x,f(x));
   endfor;
   p:=p--(5,f(5));
   %clip function path to clipping path
   p:=p cutbefore cpath;
   p:=reverse p;
   p:=p cutbefore cpath;
   %initialize scale
   numeric u; 10u=2in;
   %draw the grid
   for k=-5u step 1u until 5u:
     draw (k,-5u)--(k,5u) withcolor 0.85white;
     draw (-5u,k)--(5u,k) withcolor 0.85white;
   endfor;
   %draw axes
   drawdblarrow (-5.2u,0)--(5.2u,0);
   drawdblarrow (0,-5.2u)--(0,5.2u);
   %label axes
   label.rt(btex $x$ etex, (5.2u,0));
   label.top(btex $y$ etex, (0,5.2u));
   label.bot(btex $5$ etex, (5u,0));
   label.lft(btex $5$ etex, (0,5u));
   %scale function path
   p:=p scaled u;
   %draw function path
   drawdblarrow p withcolor blue;
   %draw plotted points
   for x=-2 step 1 until 2:
     drawdot ((x,f(x)) scaled u) withpen pencircle scaled 4pt;
   endfor;
\stopuseMPgraphic

\placefigure{The simple parabola.}{\useMPgraphic{yeqx2}}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: drawdot fails?
  2005-12-18 21:57 drawdot fails? David Arnold
@ 2005-12-18 22:37 ` Taco Hoekwater
  2005-12-18 22:56   ` David Arnold
  2005-12-18 22:56   ` David Arnold
  0 siblings, 2 replies; 6+ messages in thread
From: Taco Hoekwater @ 2005-12-18 22:37 UTC (permalink / raw)


David Arnold wrote:
> All,
> 
> I am wondering why my dots are not filled with the drawdot command.

Works for me. (-2,4), (-1,1), (0,0), (1,1) and (2,4) are black
dots on a blue line. tex&pdf files mailed separately.

Taco

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: drawdot fails?
  2005-12-18 22:37 ` Taco Hoekwater
@ 2005-12-18 22:56   ` David Arnold
  2005-12-18 23:08     ` Taco Hoekwater
  2005-12-18 22:56   ` David Arnold
  1 sibling, 1 reply; 6+ messages in thread
From: David Arnold @ 2005-12-18 22:56 UTC (permalink / raw)


Look more closely. The dots are not filled.

On Dec 18, 2005, at 2:37 PM, Taco Hoekwater wrote:

> David Arnold wrote:
>> All,
>> I am wondering why my dots are not filled with the drawdot command.
>
> Works for me. (-2,4), (-1,1), (0,0), (1,1) and (2,4) are black
> dots on a blue line. tex&pdf files mailed separately.
>
> Taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: drawdot fails?
  2005-12-18 22:37 ` Taco Hoekwater
  2005-12-18 22:56   ` David Arnold
@ 2005-12-18 22:56   ` David Arnold
  1 sibling, 0 replies; 6+ messages in thread
From: David Arnold @ 2005-12-18 22:56 UTC (permalink / raw)


As an alternative, replace the drawdot command with the draw command.  
Then the dots fill.

On Dec 18, 2005, at 2:37 PM, Taco Hoekwater wrote:

> David Arnold wrote:
>> All,
>> I am wondering why my dots are not filled with the drawdot command.
>
> Works for me. (-2,4), (-1,1), (0,0), (1,1) and (2,4) are black
> dots on a blue line. tex&pdf files mailed separately.
>
> Taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: drawdot fails?
  2005-12-18 22:56   ` David Arnold
@ 2005-12-18 23:08     ` Taco Hoekwater
  2005-12-18 23:15       ` David Arnold
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2005-12-18 23:08 UTC (permalink / raw)


David Arnold wrote:
> Look more closely. The dots are not filled.

I assure you that I see them filled, in Acroread, as well
as in xpdf. I'll send you a screenshot. :-)

Taco

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: drawdot fails?
  2005-12-18 23:08     ` Taco Hoekwater
@ 2005-12-18 23:15       ` David Arnold
  0 siblings, 0 replies; 6+ messages in thread
From: David Arnold @ 2005-12-18 23:15 UTC (permalink / raw)


Aha!

In Previewer on my Mac, the dots are not filled. But when I open the  
same document in Acrobat Professional, they're filled!

Thanks.

On Dec 18, 2005, at 3:08 PM, Taco Hoekwater wrote:

> David Arnold wrote:
>> Look more closely. The dots are not filled.
>
> I assure you that I see them filled, in Acroread, as well
> as in xpdf. I'll send you a screenshot. :-)
>
> Taco
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-18 23:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-18 21:57 drawdot fails? David Arnold
2005-12-18 22:37 ` Taco Hoekwater
2005-12-18 22:56   ` David Arnold
2005-12-18 23:08     ` Taco Hoekwater
2005-12-18 23:15       ` David Arnold
2005-12-18 22:56   ` David Arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).