# income distribution champagne glass in tikz

I was trying to draw this or this. However, it is really hard for me to create the concave part of these images and seperate the picture into 5 equal parts.

• Please add code of your attempts until now and show us, where exactly your are getting problems. Like this, it is just a "do it for me" question. Thank you. – LaRiFaRi Nov 27 '13 at 11:50
• –1: Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. Notify me, when you added some more information an I’d be happy to redeem my downvote … – Tobi Nov 27 '13 at 12:35
• I think this is one of the examples where the quicker route might be to generate the graph in R and use (a LaTeX) export in your document instead of generating the plot in LaTeX – Habi Nov 27 '13 at 14:07
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – samcarter_is_at_topanswers.xyz Nov 9 '17 at 1:05

## 2 Answers

Drawing with Bézier curves can take a bit of getting used to, and may involve some trial and error when trying to code curves in tikz rather than drawing them using a vector graphics program.

The following shows how I got what appears to be the required shape. The show curve controls decoration is only there to illustrate the control points I used.

\documentclass[tikz,border=0.125cm]{standalone}
\usetikzlibrary{decorations.pathreplacing}

\tikzset{
show curve controls/.style={
decoration={
show path construction,
curveto code={
\draw [gray, thick]
(\tikzinputsegmentfirst)
.. controls (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb) .. (\tikzinputsegmentlast);
\draw [red, thick]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentsupporta);
\draw [red, thick]
(\tikzinputsegmentsupportb) -- (\tikzinputsegmentlast);
\fill [black]
(\tikzinputsegmentfirst) circle [radius=2pt]
(\tikzinputsegmentlast)  circle [radius=2pt];
\fill [blue]
(\tikzinputsegmentsupporta) circle [radius=2pt]
(\tikzinputsegmentsupportb)  circle [radius=2pt];
}
},
decorate}
}

\begin{document}

\begin{tikzpicture}
\draw [help lines] (-5,0) grid (5,10);
\path  [fill=gray!20, fill opacity=0.5, postaction=show curve controls]
(-5,10)
.. controls ++(270:2) and ++(100:4) .. (-1/2,6)
.. controls ++(280:1) and ++(90:2)  .. (-1/4,0)
-- (1/4,0)
.. controls ++(90:2) and ++(260:1) .. (1/2, 6)
.. controls ++(80:4) and ++(270:2) .. (5,10) -- cycle;
\end{tikzpicture}

\end{document}


You may use some LaTeX/PSTricks packages for chemists as explained by Denis Girou and retransmitted by Benjamin Collas. They may be difficult to integrate in tikz. Here is an example from page 50 (25 of PDF):

\usepackage{pst-labo}
\pstChauffageBallon[glassType=flacon,recuperationGaz,
tubeRecourbeCourt,substance={\pstFilaments[10]{gray}}]


You may also use pst-plot, or pst-text, see page 49 of same link.

• Very nice, but I don't think this answers the OP's question. If you take a look at the two links in the question, you'll see that the OP is after a particular curve that sort of looks like a champagne glass, not after a way of drawing actual glasses. – Jake Nov 27 '13 at 12:52