Why is the figure not centered
![](https://secure.gravatar.com/avatar/50e7e6ec58e101311283a40e60c33572.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/50e7e6ec58e101311283a40e60c33572.jpg?s=120&d=mm&r=g)
That worked great! Thanks.
On Fri, Mar 12, 2010 at 11:50 AM, Aditya Mahajan
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 ___________________________________________________________________________________
participants (2)
-
Aditya Mahajan
-
Curiouslearn