ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Why is the figure not centered
@ 2010-03-12 16:29 Curiouslearn
  2010-03-12 16:50 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Curiouslearn @ 2010-03-12 16:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Can someone please tell me why the code below does not (horizontally)
center the figure? The caption is in the middle but the figure is not.

Thanks.

\usemodule[pgfplots]
\starttext

\placefigure[here][fig:demand]{Demand Curve}
{\starttikzpicture
	\startaxis[line width=1pt,
			   axis x line = bottom,
			   axis y line =left,
			   xmin=0,xmax=60,
			   ymax=120]
		\addplot[mark=none] coordinates {(0,100)
							  (50,0)};
	\stopaxis
\stoptikzpicture}

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Why is the figure not centered
  2010-03-12 16:29 Why is the figure not centered Curiouslearn
@ 2010-03-12 16:50 ` Aditya Mahajan
  2010-03-12 17:10   ` Curiouslearn
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2010-03-12 16:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 12 Mar 2010, Curiouslearn wrote:

> Can someone please tell me why the code below does not (horizontally)
> center the figure? The caption is in the middle but the figure is not.
>
> Thanks.
>
> \usemodule[pgfplots]
> \starttext
>
> \placefigure[here][fig:demand]{Demand Curve}
> {\starttikzpicture
> 	\startaxis[line width=1pt,
> 			   axis x line = bottom,
> 			   axis y line =left,
> 			   xmin=0,xmax=60,
> 			   ymax=120]
> 		\addplot[mark=none] coordinates {(0,100)
> 							  (50,0)};
> 	\stopaxis
> \stoptikzpicture}
>
> \stoptext

Add a \hbox around \starttikzpicture ... \stoptikzpicture

See 
http://archive.contextgarden.net/message/20090722.010815.d9c051d3.en.html

and Hans's reply.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Why is the figure not centered
  2010-03-12 16:50 ` Aditya Mahajan
@ 2010-03-12 17:10   ` Curiouslearn
  0 siblings, 0 replies; 3+ messages in thread
From: Curiouslearn @ 2010-03-12 17:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

That worked great! Thanks.

On Fri, Mar 12, 2010 at 11:50 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Fri, 12 Mar 2010, Curiouslearn wrote:
>
>> Can someone please tell me why the code below does not (horizontally)
>> center the figure? The caption is in the middle but the figure is not.
>>
>> Thanks.
>>
>> \usemodule[pgfplots]
>> \starttext
>>
>> \placefigure[here][fig:demand]{Demand Curve}
>> {\starttikzpicture
>>        \startaxis[line width=1pt,
>>                           axis x line = bottom,
>>                           axis y line =left,
>>                           xmin=0,xmax=60,
>>                           ymax=120]
>>                \addplot[mark=none] coordinates {(0,100)
>>                                                          (50,0)};
>>        \stopaxis
>> \stoptikzpicture}
>>
>> \stoptext
>
> Add a \hbox around \starttikzpicture ... \stoptikzpicture
>
> See
> http://archive.contextgarden.net/message/20090722.010815.d9c051d3.en.html
>
> and Hans's reply.
>
> Aditya
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-03-12 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 16:29 Why is the figure not centered Curiouslearn
2010-03-12 16:50 ` Aditya Mahajan
2010-03-12 17:10   ` Curiouslearn

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).