魔力象限图

魔力象限图

是否可以在 Latex 中绘制“魔力象限图”?这是一个例子:

在此处输入图片描述

我不需要确切的答案。我需要一些线索来知道我是否可以用 latex 绘制它。如果可以,请告诉我图表和包的名称。

多谢。

答案1

将其嵌入为外部图形,如在 Wikibook 页面的 LaTeX 图形部分有描述或者使用这个答案, 例如元帖子我用它来举这个不太严重的例子。

四盒模型

坐标(x,y)基于 tex.SE 上最热门主题中提出的问题数量。

prologues := 3;
outputtemplate := "%j%c.eps";
% a magic quadrant template
beginfig(1);
defaultfont := "phvr8r";

s = 3.4in;

fill unitsquare scaled s                withcolor .95 white;
fill unitsquare scaled s shifted -(s,s) withcolor .95 white;

path L, a,b,c,d;
L = unitsquare xscaled 1/2s yscaled 1/12s;
a = L shifted (1/4s,11/12s);
b = L shifted (-3/4s,11/12s);
c = L shifted (-3/4s,-s);
d = L shifted (1/4s,-s);

drawoptions(withcolor .98 white);
fill a; fill b; fill c; fill d;

drawoptions(withcolor .8 white);
draw a; draw b; draw c; draw d; 
label("LEADERS",       center a);
label("CHALLENGERS",   center b);
label("NICHE PLAYERS", center c);
label("VISIONARIES",   center d);

draw (left--right) scaled s withpen pensquare scaled 1;
draw (down--up   ) scaled s withpen pensquare scaled 1;
draw unitsquare shifted -(1/2,1/2) scaled 2s withpen pensquare scaled 2;

picture xx, yy, date; 
xx = thelabel.lrt("COMPLETE LACK OF VISION", llcorner currentpicture);
yy = thelabel.ulft("ABILITY TO LOOK CUTE" 
              infont defaultfont rotated 90, llcorner currentpicture);
date = thelabel.llft("As of 1 April 2015",   lrcorner currentpicture);
draw xx;
draw yy;
drawarrow ((12,4) -- (53,4)) shifted lrcorner xx;
drawarrow ((4,12) -- (4,53)) shifted ulcorner yy;
draw date;
drawoptions();

picture blob; color blu; blu = (22/255,90/255,150/255);
blob = image(
for i=10 step -1 until 3: fill fullcircle scaled .9i withcolor ((8-i/2)/10)[blu,white]; endfor
draw fullcircle scaled 9 withcolor blu;);

vardef do_mark(expr name,x,y,offset) =
   save p, t; pair p; p := ((x-5)/5,(y-20)/20) scaled s;
   picture t; t = thelabel(name,p+offset);
   if (abs(ypart offset) > 16) or (length(offset)>1cm):
     draw p -- p+offset cutafter bbox t withpen pencircle scaled .3 withcolor .5 white; 
   fi
   draw blob shifted p; draw t withcolor blu;
enddef;

do_mark("tikz-pgf"            , 9.249,  5, (  0, 12));
do_mark("tables"              , 4.701, 20, (  0, 12));
do_mark("beamer"              , 3.822, 15, ( 24, 0));
do_mark("fonts"               , 3.302, 24, (  0, 12));
do_mark("math-mode"           , 3.298, 18, ( 32, 0));
do_mark("spacing"             , 2.983, 14, (  0, 12));
do_mark("macros"              , 2.851,  9, ( 22, -6));
do_mark("pgfplots"            , 2.824, 27, (  0, 12));
do_mark("graphics"            , 2.608, 18, (  0, 12));
do_mark("biblatex"            , 2.539, 10, ( 40, 20));
do_mark("table-of-contents"   , 2.429,  8, ( 43, -6));
do_mark("bibtex"              , 2.272, 10, ( 10, 22));
do_mark("floats"              , 2.230,  9, ( 48, 12));
do_mark("sectioning"          , 2.224,  5, ( 30, -3));
do_mark("bibliographies"      , 2.071,  9, (-20, 22));
do_mark("horizontal-alignment", 2.041,  6, ( 52, 2));
do_mark("xetex"               , 1.846, 14, ( 12, 24));
do_mark("errors"              , 1.845, 29, (  0, 12));
do_mark("hyperref"            , 1.706,  7, (-27, -6));
do_mark("formatting"          , 1.696,  9, (-36, -12));
do_mark("equations"           , 1.688,  5, (  0, -24));
do_mark("symbols"             , 1.622, 14, (-20, 22));
do_mark("header-footer"       , 1.582, 12, (-36, 2));
do_mark("cross-referencing"   , 1.574, 34, (  0, 12));
do_mark("pdftex"              , 1.503, 10, (-32, -2));

setbounds currentpicture to bbox currentpicture scaled 1.05;
endfig;
end.

相关内容