## LaTeX forum ⇒ General ⇒ Not all segments are drawn

LaTeX specific issues not fitting into one of the other forums of this category.
bekromoularo
Posts: 2
Joined: Tue Aug 04, 2015 9:45 pm

### Not all segments are drawn

Hello, I am a brand new user of Latex and here is my problem.
I am using a code that prints Latex code on a file. Specificaly that code is about to print some segments so i can present a computational geometry project.
The code that is printed by my programm is this:
\documentclass{article}\usepackage{fullpage}\special{landscape}\usepackage{tikz}\begin{document} \begin{tikzpicture}[scale=1.0] \draw[step=1cm,help lines] (0,0) grid (170,60); \draw (341/2,0) node{$x$};\draw [<->,very thick] (-1/10,0) -- (1701/10,0); \draw (0,121/2) node{$y$};\draw [<->,very thick] (0,-1/10) -- (0,601/10); \foreach \x/\xtext in {0,2,...,170}     \draw (\x,-2/5) node{$\xtext$}; \foreach \y/\ytext in {0,2,...,60}     \draw (-3/5,\y) node{$\ytext$}; \draw (90,10) -- (100,0) (40,30) -- (50,20) (120,40) -- (130,30) (150,50) -- (170,60) (50,20) -- (54,18) (130,30) -- (150,50) (100,0) -- (120,40) (20,30) -- (40,30) (10,10) -- (20,30) (0,40) -- (10,10) ; \filldraw (100,0) circle (2pt) (150,50) circle (2pt) (54,18) circle (2pt) (20,30) circle (2pt) (90,10) circle (2pt) (120,40) circle (2pt) (10,10) circle (2pt) (40,30) circle (2pt) (50,20) circle (2pt) (170,60) circle (2pt) (130,30) circle (2pt) (0,40) circle (2pt) ; \end{tikzpicture} \end{document}

When I compile the Latex to pdf, I get no errors but I do not get what i want.
It only prints a partition of the grid. And i get 2 pages. The first page is empty.
When I compile it and try to open it via Yap I get invalid argument(miktex).
What's the problem here?

Tags:

Johannes_B
Site Moderator
Posts: 4077
Joined: Thu Nov 01, 2012 4:08 pm
Hi and welcome,

unfortunately, i am not the Tikzpert araound here. But i know one thing: The default unitlength of tikz i centimeters. That means you are setting up a grid that is 1.7 meters wide. That won't fit on a normal page, no matter of A4 or letter paper

You can work with scale or use \begin{tikzpicture}[x=1mm,y=1mm]. The latter has some drawbacks, as you may note.

You can also use the standalone class to get just the picture. When inputting it somewhere, it will be unreadable once more

Somebody with more TikZ experience will come along soon, i think
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bekromoularo
Posts: 2
Joined: Tue Aug 04, 2015 9:45 pm
Thank you for your quick answer. I managed to create a better pdf. But what is this invalid arguement error when i am using Yap?

Johannes_B
Site Moderator
Posts: 4077
Joined: Thu Nov 01, 2012 4:08 pm
Invalid argument? yap?

Aren't you using pdflatex to get a pdf directly?

yap is sometimes used to view the dvi file. Don't. It is not a format for direct view and what you see may not be that was is going to be printed (on paper or pdf).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.