Graphics, Figures & TablesError with pgfplots graph

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gmsotavio
Posts: 10
Joined: Sun Aug 12, 2012 1:41 am

Error with pgfplots graph

Post by gmsotavio »

Hello!

I've been getting error messages when I try to plot the graph attached. The compiler says the following error message:

Code: Select all

(./grafico_5_grayscale.tikz
! Package pgfplots Warning: Axis range for axis y is approximately empty; enlar
ging it (it is [0.0:0.0])
! Missing number, treated as zero.
<to be read again> 
                   i
l.33 \end{axis}
I generated this graph with matlab, dropping a .eps file (
grafico_5_color.eps
EPS File
(68.9 KiB) Downloaded 388 times
) and a .tikz file (
grafico_5_grayscale.txt
TIKZ code in .txt
(80.79 KiB) Downloaded 469 times
) for pgfplots. However, the TikZ does not work. Does anyone have any hint of what might be happening?
Last edited by cgnieder on Sun May 12, 2013 11:26 pm, edited 2 times in total.
Otavio Augusto

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

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Error with pgfplots graph

Post by mas »

You should provide a complete compilable example.

There is an error in your ymin, ymax setting. I removed the ymax and ymin and got the graph. The graph is attached. Is it what you expected?
pic.png
pic.png (10.34 KiB) Viewed 5153 times

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
gmsotavio
Posts: 10
Joined: Sun Aug 12, 2012 1:41 am

Re: Error with pgfplots graph

Post by gmsotavio »

Hey "mas". Thanks a lot. Is exactly it. In the next time, I going to provide a complete compilable example. Sorry.
Otavio Augusto
Post Reply