Graphics, Figures & Tables ⇒ PSTricks | Draw a Theatre Hall
- svend_tveskaeg
- Posts: 478
- Joined: Sun Jul 12, 2009 5:31 am
PSTricks | Draw a Theatre Hall
I would like to create the drawing in the attached picture with PSTricks. (I do not use or know TikZ at all.)
I am able to do this, but it is going to be very painstaking work. How can I do it without too much work?
Thank you in advance!
-- Zapp Brannigan, Futurama (season 1, episode 4)
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
PSTricks | Draw a Theatre Hall
Would mind showing us how you're doing it? Otherwise (I am sure you agree) it is impossible to show you a less painstaking way. I could come up with something but maybe it's even more complicated than your way, so...
Regards
- svend_tveskaeg
- Posts: 478
- Joined: Sun Jul 12, 2009 5:31 am
PSTricks | Draw a Theatre Hall
I have not actually any code yet, but my idea is to draw every red square using something like
Code: Select all
\documentclass{article}
\usepackage{auto-pst-pdf,pstricks-add}
\newcommand{\seat}[4]{\psline(#1,#2)(#1,#3)(#4,#3)(#4,#2)(#1,#2)}
\begin{document}
\begin{figure}
\centering
\psset{fillstyle=solid,fillcolor=red}
\begin{pspicture}(1,1)
\seat{0}{0}{1}{1}
\end{pspicture}
\label{theatre}
\end{figure}
\end{document}
Code: Select all
pdflatex -shell-escape <filename>.tex

The rest of the drawing is no problem (I assume).
-- Zapp Brannigan, Futurama (season 1, episode 4)
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
PSTricks | Draw a Theatre Hall
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- svend_tveskaeg
- Posts: 478
- Joined: Sun Jul 12, 2009 5:31 am
Re: PSTricks | Draw a Theatre Hall
I do not understand where the squares come from.
Any change I can get someone to draw just a few squares for me? If I get the syntax, I can do the rest myself.
-- Zapp Brannigan, Futurama (season 1, episode 4)
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
PSTricks | Draw a Theatre Hall
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- svend_tveskaeg
- Posts: 478
- Joined: Sun Jul 12, 2009 5:31 am
Re: PSTricks | Draw a Theatre Hall
Just a small example to get me going would be much appreciated.
-- Zapp Brannigan, Futurama (season 1, episode 4)
- svend_tveskaeg
- Posts: 478
- Joined: Sun Jul 12, 2009 5:31 am
PSTricks | Draw a Theatre Hall
Can I see your idea? (Just for the fun of it.)
As I already pointe out, a concrete example where the
[color=#800000]\psMatrixPlot[/color]
command is used will be much appreciated.-- Zapp Brannigan, Futurama (season 1, episode 4)
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
PSTricks | Draw a Theatre Hall
And exactly such a concrete example can be found in the manual. So kindly have look at it, start a first approach and ask targeted questions in case that you run into trouble. m(svend_tveskaeg wrote:[…] As I already pointe out, a concrete example where the\psMatrixPlot
command is used will be much appreciated.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
PSTricks | Draw a Theatre Hall
I have never used pstricks before. My post should only be a teaser for you to show an own attemptsvend_tveskaeg wrote:@cgnieder:
Can I see your idea? (Just for the fun of it.)

Code: Select all
\documentclass{article}
\usepackage{tikz,etoolbox}
\usetikzlibrary{calc}
\colorlet{seat}{red!50!black!50}
\colorlet{mixer}{black}
\colorlet{stage}{brown}
\tikzset{
seat/.style={
draw = seat,
fill = seat!75,
minimum width = 5pt,
minimum height = 5pt
},
nonseat/.style={
minimum width = 5pt,
minimum height = 5pt
},
mixer/.style={
draw = mixer,
fill = mixer!75,
minimum width = 5pt,
minimum height = 5pt
}
}
\makeatletter
\DeclareListParser*{\draw@row}{,}
\def\@draw@row#1{%
\ifx#1x \node[seat] {} ;\fi
\ifx#1_ \node[nonseat] {} ;\fi
\ifx#1m \node[mixer] {} ;\fi
\pgfmatrixnextcell}
\def\drawrow#1{\draw@row{\@draw@row}{#1}\\}
\makeatother
\def\emptyrow{\\[7pt]}
\begin{document}
\begin{tikzpicture}
\matrix[draw,row sep=1pt,column sep=1pt] (auditorium) at (0,0) {
\drawrow{x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x}
\emptyrow
\drawrow{x,x,_,_,x,x,x,x,x,x,x,x,x,x,x,x,x,_,_,x,x}
\drawrow{x,x,_,_,x,x,x,x,x,x,x,x,x,x,x,x,x,_,_,x,x}
\emptyrow
\drawrow{_,x,x,_,_,x,x,x,x,x,x,x,x,x,x,x,_,_,x,x,_}
\drawrow{_,x,x,_,_,x,x,x,x,x,x,x,x,x,x,x,_,_,x,x,_}
\drawrow{_,x,x,_,_,x,x,x,x,x,m,x,x,x,x,x,_,_,x,x,_}
\emptyrow
\drawrow{_,_,x,x,_,_,x,x,x,x,x,x,x,x,x,_,_,x,x,_,_}
\drawrow{_,_,x,x,_,_,x,x,x,x,x,x,x,x,x,_,_,x,x,_,_}
\drawrow{_,_,x,x,_,_,x,x,x,x,x,x,x,x,x,_,_,x,x,_,_}
\emptyrow
\drawrow{_,_,_,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,_,_,_}
};
\draw[fill=stage]
($(auditorium.south west)+(13pt,-13pt)$) rectangle ($(auditorium.south east)+(-13pt,-28pt)$);
\end{tikzpicture}
\end{document}