Graphics, Figures & TablesProblem using pstricks and \includegraphics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Lenin Arango
Posts: 3
Joined: Fri Jul 19, 2013 5:33 pm

Problem using pstricks and \includegraphics

Post by Lenin Arango »

I want to use these to ways to create a figure in my document:
A)

Code: Select all

\begin{figure}[H]
\begin{center}
\subfigure[ Simulation T=10]{
\includegraphics[scale=.3]{Question1_partb_t10.png}
}
\subfigure[Simulation T=100 ]{
\includegraphics[scale=.3]{Question1_partb_t100.png}
}
\end{center}
\caption{Simulated power functions} \label{fig:2}
\end{figure}
B)

Code: Select all

\begin{figure}[H]
\vspace{7cm}
%\centering
\hspace{5cm}
\begin{pspicture}(0,0)
\psset{xunit=10pt,yunit=10pt}
\psaxes[labels=none,ticks=none]{->}(0,0)(0,0)(20,20)
\pscurve[linecolor=blue]{}(1,18)(8,8)(20,3)
\end{pspicture}
\vspace{0.5cm}
\caption{The labor market. Indivisible labor}
\end{figure}
But, when I try to compile it, it does not work at all. I use Texmaker as editor and I test different ways in my configuration. Any idea?
Last edited by Stefan Kottwitz on Fri Jul 19, 2013 9:46 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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Problem using pstricks and \includegraphics

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

There are many possible reasons. It would be good if you would post the document preamble, i.e. used packages and settings, so we could tell you the specific cause.

Stefan
LaTeX.org admin
Lenin Arango
Posts: 3
Joined: Fri Jul 19, 2013 5:33 pm

Re: Problem using pstricks and \includegraphics

Post by Lenin Arango »

Hi,

See attached the document. I use Texmaker as editor. If I use the configuration
A) PdfLaTeX + ViewPDF - I can insert .png figures, but I cannot draw using pstricks.

B) LaTeX + dvips + ps2pdf + ViewPDF - I can draw but I cannot insert .png images.

Thanks
Attachments
Problempstricks.tex
(1.83 KiB) Downloaded 416 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Problem using pstricks and \includegraphics

Post by Johannes_B »

pdflatex does not work with pstricks, but you can use something like auto-pst-pdf. But you have to run pdflatex with the shell-escape-option.

Please also read about Minimal Working Examples.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply