[Tex/LaTex] draw a rectangle with a solid dot in each corner

graphics

I want to draw a rectangle with a solid dot in each corner. How can I do this?

Best Answer

This is to give a variant from Marco's answer, concerning the Tikz part of his answer. It looks more like the pstricks answer and does not require that you enter the coordinates twice.

The code is

\documentclass[border=5pt]{standalone}

\usepackage{tikz}

\begin{document}
\begin{tikzpicture}

\draw plot[mark=*,mark size = 1pt,mark options={color=red}] coordinates {(0,0)(1,0)(1,1)(0,1)} -- cycle; 

\end{tikzpicture}
\end{document}

plot will give straight lines segments if you don't ask for a smooth plot from coordinates.

The result is

enter image description here

Related Question