# set domain in pgfplots

I created this graph. The graph is shown correctly but I need the range on the y-axis to be from 10e-8 to 1. I would also like a grid. I'm a newbie with the pgfplots package.

\begin{figure}[htp]
\centering
\begin{tikzpicture}
\begin{semilogyaxis}[xlabel=distanza]
thick,blue]
file {./MATLAB/file.txt};
\end{semilogyaxis}
\end{tikzpicture}
\end{figure}
-

If I understand your question correctly, you can use ymin=, ymax= to define the y-axis limits (everything outside of the axis limits will be clipped away). For the grid, you have the grid= option; a simple example:

\documentclass{article}
\usepackage{pgfplots}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}
\begin{semilogyaxis}[ymin=0.000000001,ymax=1,xlabel=distanza,grid=major]