4

I was wondering if someone can indicate me the easiest way to sketch the following picture. I started using the axis environment from pgfplots package as you can see from my code below, but then I got stuck.

I thank you in advance!

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}

\begin{axis}[axis lines=middle,axis equal,grid=both]
    \addplot coordinates{(0,0) (5,5) };
\end{axis}

\end{tikzpicture}
\end{document}

Kano Model

  • If you want to plot the red and green line, you need the functions. What are they? – Alenanno May 2 '15 at 17:10
6

I don't think it's necessary to use pgfplots. I think you can get the effect you want (and somewhat easier) using just tikz.

\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\begin{document}

\begin{tikzpicture}
  \coordinate (Q) at (0,0);

  %% put this first even though you can use opacity. 
  \coordinate (indifferent/nw) at (-0.5in,0.5in);
  \fill[gray,opacity=0.20] (indifferent/nw) rectangle ++ (1in,-1in);
  \path (indifferent/nw) ++ (-0.5cm,0.5cm) node[anchor=south east] (indifferent/label) {indifference};
  \draw (indifferent/nw) -- (indifferent/label.base east);

  \draw[arrows=-Stealth,purple]
       (Q) ++ (-2in,0) node [anchor=east,align=center,text width=0.75in]
                            {Need not~fulfilled}
           -- 
           ++ (4in,0)  node [anchor=west,align=center,text width=0.75in]
                            {Need well~fulfilled};
  \draw[arrows=-Stealth,purple]
       (Q) ++ (0,-2in) node [anchor=north,align=center,text width=0.75in]
                            {dissatisfied}
           -- 
           ++ (0,4in)  node [anchor=south,align=center,text width=0.75in]
                            {satisfied};

  \draw[blue,text=blue] 
              (Q) ++ (-2in,-2in) 
                  -- 
                  ++ (4in,4in) node[pos=0.75,anchor=north west] {Performance};


  \draw[red,text=red] 
             (Q) ++ (-2in,0.25cm) .. controls (-0.5cm,0.25cm) and
                                              ( 0.5cm,1.00cm)
                                  ..            
                    (1.25in,2in)
                    node[pos=0.95,anchor=south east] {Excitement};


 \draw[red,text=red]
            (Q) ++ (-1.25in,-2in) .. controls (-0.5cm,-1.00cm) and
                                              ( 0.5cm,-0.45cm)
                                  ..
                   (2in,-0.5cm)
                   node[pos=0.80,anchor=north west] {Basic};


\end{tikzpicture}

\end{document}

enter image description here

The basic idea here is that \draw commands are really a kind of a path and nodes can be defined along those paths. In particular, we can specify the position of a node by using pos=<val> in the optional argument to the node. Anchoring helps place the text relative to where we want it. text width in combination with align helps get the labels along the x-axis to wrap and center themselves (I used ~ to get well and fulfilled to stick together). Finally, the color of the text can also be specified using text=<color> in the optional arguments. Finally, I used .. controls (<coordinate>) and (<coordinate>) .. to construct the curves. It occurs to me now that I should have tried to make these a bit more asymptotic along performance, but I let you tweak that.

  • I actually like this picture better than the original picture in the question. :p – 1010011010 May 2 '15 at 20:05
5

For this sort of semi-technical sketch you might consider Metapost as an alternative tool. Here I've followed my preferred sequence to keep everything nicely organized: define the paths (relative to each other as far as possible); draw them; then add the labels.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);
% set a unit scale
u := 1cm;

% define the various paths 
path fulfillment, satisfaction, indifference, performance, excitement, basic;
indifference = unitsquare shifted -(1/2,1/2) scaled 2u;
fulfillment  = (left--right) scaled 3u;
satisfaction = fulfillment rotated 90;
performance  = (xpart point 0 of fulfillment, ypart point 0 of satisfaction) 
            -- (xpart point 1 of fulfillment, ypart point 1 of satisfaction);

excitement = point 0 of fulfillment shifted (0,1/3u) 
             {direction 0 of fulfillment} ..
             {direction 1 of performance}
             point 1 of performance shifted (-1/3u,0);

basic = excitement rotated 180;

% draw the paths
fill      indifference withcolor .9 white;
drawarrow fulfillment  withcolor .5 white;
drawarrow satisfaction withcolor .5 white;
draw      performance  withcolor .67 blue;
draw      excitement   withcolor .67 red;
draw      basic        withcolor .67 green;

% do the labels
verbatimtex
\font\ss=phvr8r\ss
\def\s#1{$\vcenter{\halign{\hfil{##}\hfil\cr#1\crcr}}$}\let\\\cr
etex

label(btex \s{satisfied} etex, point 1 of satisfaction shifted 10 up);
label(btex \s{dissatisfied} etex, point 0 of satisfaction shifted 10 down);

label(btex \s{needs not\\fulfilled}  etex, point 0 of fulfillment shifted 28 left);
label(btex \s{needs well\\fulfilled} etex, point 1 of fulfillment shifted 28 right);

z1 = point 3 of indifference shifted (-u/2,u/2); draw point 3 of indifference -- z1 withcolor .9 white;
label.lft(btex \s{indifference} etex, z1 + 3 up) withcolor .7 white;

label.ulft(btex \s{excitement}  etex, point .9 of excitement)  withcolor .67 red;
label.lrt (btex \s{performance} etex, point .8 of performance) withcolor .67 blue;
label.lrt (btex \s{basic}       etex, point .2 of basic)       withcolor .67 green;

endfig;
end.

Notes

  • The link above shows you various approaches for integrating MP into your workflow, and has links to the manuals.

  • I've used rather long names for all the paths so you could follow what was being done more easily

  • You can change the scale of the drawing by adjusting the value of u at the top.

  • Straight paths have just one segment, so point 0 is the beginning and point 1 is the end.

  • I've defined satisfaction as a copy of fulfillment rotated 90 degrees clockwise, and basic as a copy of excitement rotated 180. This makes the diagram nice and symmetrical.

  • I've defined some very simple plain TeX commands to let me set the labels neatly. You can use LaTeX as well, as explained in the manual. Indeed with the gmp package, or with luatex or context you can include MP code as part of your LaTeX source file, like TikZ.

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.