%!TEX pdflatex

\documentclass{article}
\usepackage{tikz}
\usepackage{xstring}

%macro manuelle grille automatique
\NewDocumentCommand\tkzGrilleAuto{ s O{thin,lightgray} m }{%macro 'manuelle'
    %étoilée : affiche l'origine (0,0)
    %2       : paramètres de la grille (couleur, épaisseur, etc)
    %3       : pasX§pasY
	\IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;}
	\StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}%
	\draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ;
}

%paramètre intégré à tikzpicture
\tikzset{grilleauto/.store in=\tkzautogrid,grilleauto/.default={},grilleauto={}}
\tikzset{every picture/.style={%
		execute at end picture={%
			\IfEq{\tkzautogrid}{}{}{\tkzGrilleAuto{\tkzautogrid}}%
		},
	},
}

\begin{document}

\begin{tikzpicture}
	%population
	\draw[very thick,purple] (0,0) circle[x radius=3cm,y radius=2cm] ;
	\draw[purple] (0.5,1.25) node[font=\small] {Population E} ;
	%ss population
	\draw[very thick,teal] (-0.75,-0.25) circle[x radius=1.75cm,y radius=1cm] ;
	\draw[teal] (-0.75,-0.25) node[font=\small] {Sous-population A} ;
\end{tikzpicture}\hspace*{5mm}
\begin{tikzpicture}
	%population
	\draw[very thick,purple] (0,0) circle[x radius=3cm,y radius=2cm] ;
	\draw[purple] (0.5,1.25) node[font=\small] {Population E} ;
	%ss population
	\draw[very thick,teal] (-0.75,-0.25) circle[x radius=1.75cm,y radius=1cm] ;
	\draw[teal] (-0.75,-0.25) node[font=\small] {Sous-population A} ;
	%grille auto
	\tkzGrilleAuto*{0.5§0.5}
\end{tikzpicture}

\vspace*{5mm}

\begin{tikzpicture}[grilleauto={0.5§0.5}]
	%triangle
	\draw[very thick] (-4,-2)--(0,7)--(6,1)--cycle ;
	%cercle
	\draw[very thick] (0,0) circle[radius=5] ;
	%segment
	\draw[very thick] (-1.75,1.25)--(1,-7);
\end{tikzpicture}

\end{document}