Graphics, Figures & Tablestables, graphs

Information and discussion about graphics, figures & tables in LaTeX documents.
ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

tables, graphs

Post by ditka »

Hi.

I have some questions

How can I change width of table:

Code: Select all

\begin{tabular}{|c| c |c|}
\hline
a & b & c \\ \hline
\end{tabular}
(So it looks like this, just that colums are wider.)

Than I woud like to ask how can I create following tables:

1) horizontal table with underline symbols,centered to each colum

2) horizontal table with symbols left of the colum

3) Horizontal table with underline centered text
(what ever I try, I always get some other thing, not what I want)


And last,how can I draw graphs(which packages I need), in latex?
That look like this,or are two dimensional
(http://ocw.mit.edu/courses/mathematics/ ... fall-2010/).

Tanx for answers.
Attachments
IMG.pdf
(54.19 KiB) Downloaded 322 times
Last edited by Stefan Kottwitz on Fri Aug 03, 2012 5:58 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: tables, graphs

Post by kaiserkarl13 »

For the first one, try using the tabular* environment instead of tabular. You can also define more paragraph-like column styles with the array package.

The second part is probably best done with TikZ, which is a vector graphics front-end for LaTeX.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tables, graphs

Post by localghost »

Please do not mix several topics in one thread. For the graphics issue please open a new topic (and give it a meaningful title).


Best regards and welcome to the board
Thorsten
ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

tables, graphs

Post by ditka »

With tables I tried this and I get picture in the attached file.

1)

Code: Select all

\begin{table}[ht]
    \begin{tabular}{|l|c|l|l|l|l|}
        \hline
        ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
       \multicolumn{1}{r}{a}  & \multicolumn{1}{r}{b}  & \multicolumn{1}{r}{c}  & \multicolumn{1}{r}{d}  & \multicolumn{1}{r}{e}  & \multicolumn{1}{r}{f}  \\
    \end{tabular}
\end{table}\\
2)

Code: Select all

\begin{tabular}{ l |c| }
\cline{2-2} a &  \\
\cline{2-2} b &   \\
\cline{2-2} c &   \\
\cline{2-2} d &  \\
\cline{2-2} e &   \\
\cline{2-2} f &   \\
\cline{2-2}
\end{tabular}\\
3)

Code: Select all

\begin{table}[ht]
    \begin{tabular}{|l|l|l|l|l|l|}
        \hline
        ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
    \end{tabular}
\end{table}\\

Can you please tell me how can I creae text under last table(where is arrow) and how can I change width of colums?
Attachments
picslddsd.pdf
(12.87 KiB) Downloaded 240 times
Last edited by Stefan Kottwitz on Sat Aug 04, 2012 12:30 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tables, graphs

Post by localghost »

Since the objects in your (first) attachment are not really tables, I would choose a graphical approach by the pgf/tikZ package.
  1. Code: Select all

    \documentclass[11pt]{article}
    \usepackage[T1]{fontenc}
    \usepackage{tikz}
    \usetikzlibrary{matrix}
    
    \begin{document}
      \begin{tikzpicture}
        \matrix (matrix) [
          matrix of nodes,
          nodes in empty cells,
          nodes={anchor=base,minimum size=2em}
        ] {
          |[draw]| & |[draw]| & |[draw]| & |[draw]| & |[draw]| \\
          a & b & c & d & e \\
        };
      \end{tikzpicture}
    \end{document}
  2. Code: Select all

    \documentclass[11pt]{article}
    \usepackage[T1]{fontenc}
    \usepackage{tikz}
    \usetikzlibrary{matrix}
    
    \begin{document}
      \begin{tikzpicture}
        \matrix (matrix) [
          matrix of nodes,
          nodes in empty cells,
          nodes={anchor=center,minimum size=2em},
          row sep=0em
        ] {
          a & |[draw]| \\
          b & |[draw]| \\
          c & |[draw]| \\
          d & |[draw]| \\
        };
      \end{tikzpicture}
    \end{document}
  3. Code: Select all

    \documentclass[11pt]{article}
    \usepackage[T1]{fontenc}
    \usepackage{tikz}
    \usetikzlibrary{matrix}
    
    \begin{document}
      \begin{tikzpicture}
        \matrix (matrix) [
          matrix of nodes,
          nodes in empty cells,
          nodes={anchor=center,draw,minimum size=2em},
        ] {
          & & & & & & & \\
        };
        \node[anchor=north] at (matrix.south) {Text};
      \end{tikzpicture}
    \end{document}
ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: tables, graphs

Post by ditka »

I get the following answer:
Attachments
fllflf.JPG
fllflf.JPG (12.63 KiB) Viewed 5508 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: tables, graphs

Post by localghost »

Your TeX system needs an update.
ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: tables, graphs

Post by ditka »

How can I do that?(I click on check for updates, and it is still the same)?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: tables, graphs

Post by localghost »

I can't tell you for PCTeX. But there should be a documentation which can.
ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: tables, graphs

Post by ditka »

Which documentation? I did not find anything. :oops:
Post Reply