0

Im confused as to how to draw some values because they take the same spot.

For example:

floor(-4/2)=-2 floor(-3/2)=-2

How do i draw it when the values are the same? I am unable to draw the circle in one end because there is another value starting at that point.

closed as off-topic by user13907, Paul Gaborit, Jesse, R. Schumacher, Svend Tveskæg Mar 22 '15 at 2:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Community, Paul Gaborit, Jesse, R. Schumacher, Svend Tveskæg
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Do you mean drawing it in LaTeX? – azetina Mar 22 '15 at 1:24
1

As the PostScript language has a floor function, it's easy with pst-plot:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\pagestyle{empty}
\usepackage[pdf, svgnames]{pstricks}%
\usepackage{pstricks-add}
\def\myfunc{x 2 div floor}
\usepackage{etoolbox} 

\begin{document}

\psset{plotpoints=100, labelFontSize=\textstyle, ticksize=-2pt 2pt}
\begin{pspicture*}(-6.5,-3.8)(6.8,3.6)
\psaxes{->}(0,0)(-6.5,-3.8)(6,3.6)[$x$,-120][$y$,-140]
\uput[dl](0,0){$O$}
\psset{linecolor=VioletRed, arrows = *->}
\multido{\i =-6 + 2, \I = -4 + 1,\n = -4.01 + 2.00}{6}{%
\ifnumless{\i}{0}%
{\psline[linestyle=dashed, linecolor=black, linewidth=0.4pt, arrows=-](\i,\numexpr\i/2-1\relax)(\i, 0)}%
{\psline[linestyle=dashed, linecolor=black, linewidth=0.4pt, arrows=-](\i,\numexpr\i/2\relax)(\i, 0)}%
\psplot[linewidth=1pt]{\i}{\n}{\myfunc}}%
\end{pspicture*}

\end{document} 

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.