Graphics, Figures & TablesAdvanced Plotting

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Henryy
Posts: 4
Joined: Sat Sep 01, 2012 9:34 pm

Advanced Plotting

Post by Henryy »

Hello LaTeX Comunnity

Today I come here facing a new problem.

I have been getting some experience using LaTeX. However, I'm not still capable of plotting propperly.

I need to plot this function
plot.gif
plot.gif (1.7 KiB) Viewed 2075 times
and I really don't have a barely idea on how to do it. I've reading some tutorials but im still blank.
Please give me some tips/ideas on plotting this.

Thanks in advance and have a good night.

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: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Advanced Plotting

Post by Stefan Kottwitz »

Hi Henryy,
Henryy wrote:I have been getting some experience using LaTeX. However, I'm not still capable of plotting propperly.
What did you try? Did you make any plot?
Henryy wrote:I've reading some tutorials but im still blank.
What did you read? And about which plotting tool: PSTricks, gnuplot, TikZ or pgfplots? I would recommend the latter, have a look at the pgfplots manual.

Stefan
LaTeX.org admin
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Advanced Plotting

Post by CrazyHorse »

Henryy wrote: I need to plot this function
The attachment plot.gif is no longer available
and I really don't have a barely idea on how to do it. I've reading some tutorials but im still blank.
Please give me some tips/ideas on plotting this.
what should (-1)^2/3 mean? It is always the same as 1

The first image is for c1=0.1 and the second for c1=2. Run the example with xelatex or latex->dvips->ps2pdf

Code: Select all

\documentclass{article}
\usepackage{pst-plot}
\begin{document}

\pstVerb{
 /c1 0.1 def 
 /sqrt3 { dup 0 lt {neg 1 3 div exp neg }{ 1 3 div exp } ifelse } def
 }
\begin{psgraph}[arrows=->](0,0)(-5,-1)(5,8){10cm}{8cm}
\psplot[algebraic,linecolor=red,
  linewidth=2pt,plotpoints=1000]{-5}{5}{sqrt3(6*c1+x*(2*x*x+21*x+18))/2^(1/3)}
\end{psgraph}

\end{document}
Attachments
xx2.png
xx2.png (5.11 KiB) Viewed 2059 times
xx.png
xx.png (5.96 KiB) Viewed 2059 times
Post Reply