2

How to create a chart as follows using LaTeX. This is just one example. You can also share your more elegant suggestions.

MWE:

current result

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections}

    \begin{document}
    \pagestyle{empty}
    \begin{tikzpicture}
    
    \begin{scope}[shift={(3cm,-5cm)}, fill opacity=0.5,
      mytext/.style={text opacity=1,font=\large\bfseries}]
    
    \draw[fill=blue, draw = black] (0,0) circle (8);
    \draw[fill=yellow, draw = black,name path=circle 1] (0,-2) circle (6);
    \draw[fill=green, draw = black,name path=circle 2] (0,-2) circle (3);
    
     
    
    \node[mytext] at (0.4,7) (A) {Artifical Intelligence}; 
    \node[mytext] at (0,3.3) (C) {Machine Learning}; 
    \node[mytext] at (0,0.1) (E) {Deep Learning};
    \end{scope}
    \end{tikzpicture}
    
    \end{document}

P.S.: I have a problem with coloring. Because the color changes at the intersection of the diagram. Also, I'm living a problem with entering the text to the next line and adding arrows like in the second figure.

enter image description here

or another example is

enter image description here

3
  • 2
    Hello. Since you're not new to this site, you probably know (or at least you should) that this is not a do it for me site. Please edit your post to provide a minimal working example (MWE) and ask for help about a specific issue you encounter.
    – SebGlav
    Aug 18 at 8:34
  • How? // Use tikz. Draw 3 circles. Use 3 "split rectangle" objects to host headline and text. Or replace the headline with an image to obtain the second example. // We are looking forward to your Edit to append tikz-code (from \documentclass to \end{document}) and screenshot(s).
    – MS-SPO
    Aug 18 at 12:21
  • Good places to start: 1) Minimal introduction (ctan.org/pkg/pgf) 2) Tikz-manual (ctan.org/pkg/pgf) 3) texample.net/tikz/examples/venn 4) split rectangles: tex.stackexchange.com/questions/301404/… .
    – MS-SPO
    Aug 18 at 12:26

1 Answer 1

2

Here are some ways to do it, which address most of your questions:

  • for simplicity I changed to standalone, which is independent of paper size; readjust later to article
  • I added two more libraries, which will be needed below
  • I put a help grid to have a better idea of the dimensions and coordinates you chose
  • add align=center to your nodes options, so you'll have multilines
  • I also put an example for shape rectangle split
  • as an example I put a new node (m) for text to the left
  • I draw 2 lines, the straight line with the standard arrow tip, a bent line with e.g. the {Stealth} tip, to show the differences

Remaining issues:

  • alignment, postioning
  • using different text fonts
  • color

(can be solved in various ways with tikz)

current result

\documentclass[10pt, border=10pt]{standalone}% fits paper automatically
\usepackage{tikz}
\usetikzlibrary{intersections, shapes.multipart, % <<< for rectangle split
                arrows.meta}

    \begin{document}
    \pagestyle{empty}
    \begin{tikzpicture}
    
    \begin{scope}[shift={(3cm,-5cm)}, fill opacity=0.5,
      mytext/.style={text opacity=1,font=\large\bfseries}]
    
    \draw [help lines] (0,0) grid (5,5); % <<< to "see" coordinates
    \draw[fill=blue, draw = black] (0,0) circle (8);
    \draw[fill=yellow, draw = black,name path=circle 1] (0,-2) circle (6);
    \draw[fill=green, draw = black,name path=circle 2] (0,-2) circle (3);
    
     
    
    \node[mytext, align=center] at (0.4,7) (A) % <<< align
            {Artifical Intelligence\\ sth. else}; % <<< now you have multi-lines
    \node[mytext] at (0,3.3) (C) {Machine Learning}; 
    
    \node[mytext,   rectangle split, 
                    rectangle split parts=2, align=center] % <<< alternative
            at (0,-2) (E) % <<< shifting
            {Deep Learning
             \nodepart{two} % <<< rectangle split
                Subnset of \\
                machine learning\\
                which 
            };
            
            
    \node [mytext] (m) at  (-10, 3.2) {Machine Learning};  
    \draw [->] (m) to (C); % standard arrow tip
    \draw [-{Stealth}] (m) to [bend left] (C); % a different tip from arrows.meta
    
    \end{scope}
    \end{tikzpicture}
    
    \end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.