pstricks: Das Bild geht ueber den text hinaus

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: pstricks: Das Bild geht ueber den text hinaus

Passende Umgebung

von localghost » Sa 9. Jun 2012, 11:00

Bitte immer ein komplettes und lauffähiges Beispiel, ein so genanntes Minmalbeispiel, präsentieren. Niemand hat Lust dazu, die nötigen Pakete zusammen zu sammeln, um aus deinen Code-Schnipseln ein komplettes Dokument zu basteln.

Für solche Sachen eignet sich die Umgebung psgraph aus pst-plot ganz gut.
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{pst-plot,pstricks-add}

\begin{document}
  \section{figura}
    This should be the picture

    \begin{figure}[!htb]
      \centering
      \psset{llx=-1.2cm,lly=-1cm,xAxisLabel={$N$},xAxisLabelPos={c,-8},yAxisLabel={$c(N)$},yAxisLabelPos={-50,c}}
      \begin{psgraph}[Dx=100,Dy=5](0,0)(400,60){10cm}{7cm}
        \savedata{\questi}[{0,0},{100,25},{200,40},{300,50},{400,60}]
        \dataplot[plotstyle=curve,showpoints=true]{\questi}
      \end{psgraph}
      \caption{This is the graph of $c(N)$}
    \end{figure}

    but it overlaps with the text!
\end{document}
Einfacher ginge es allerdings mit pgfplots (basiert auf pgf/tikZ). Ein ganz einfaches Beispiel basierend auf deinem Material.
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}

\begin{document}
  \section{figura}
    This should be the picture

    \begin{figure}[!htb]
      \centering
      \begin{tikzpicture}
        \begin{axis}[
          xmin=0,xmax=400,
          xlabel={$N$},
          xlabel near ticks,
          ymin=0,ymax=60,
          ylabel={$c(N)$},
          ylabel near ticks,
          ytick={0,10,...,60}
        ]
          \addplot[smooth,mark=*] coordinates {
            (0,0) (100,25) (200,40) (300,50) (400,60)
          };
        \end{axis}
      \end{tikzpicture}
      \caption{This is the graph of $c(N)$}
    \end{figure}

    but it overlaps with the text!
\end{document}
Kann dann auch direkt mit PDFLaTeX bearbeitet werden.


Thorsten

pstricks: Das Bild geht ueber den text hinaus

von stefa » Sa 9. Jun 2012, 09:25

Gruss Gott,

ich habe das unterstehende Dokument gefasst. Aber Text und Bild decken
sich...was sollte ich tun? ich bin ein Anfaenger. danke!
\begin{document}

\section{figura}

This should be the picture

\begin{figure}[!hbtp]
\psset{xunit=0.4mm,yunit=1.5mm}
\savedata{\questi}[{0,0},{100,25},{200,40},{300,50},{400,60}]
\dataplot[plotstyle=curve,showpoints=true]{\questi}
\psaxes[Dx=100,Dy=10]{->}(0,0)(0,0)(410,62)
\vspace{5mm}
\caption{This is the graph of $c(N)$}
\end{figure}

but it overlaps with the text!

\end{document}

Nach oben