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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
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 412 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