Modérateur : Groupe des modérateurs
Summary: TeXdraw - produce PostScript drawings from within TeX
Version: (920707)
Description:
The TeXdraw package consists of a set of macro definitions for the TeX
typesetting program. These macros allow the user to produce PostScript
drawings from within TeX.
The main benefits of TeXdraw accrue from the ability to produce drawings
from <within> TeX, using TeX fonts for labeling the drawing.
TeXdraw interfaces with the dvips (dvi to PostScript) print program.
Basic drawing features include:
(1) moves, lines and arrow vectors
- selectable gray level, line width pattern, arrowhead size and type
(2) circles, ellipses, arcs, and Bezier curves
(3) general fill command to fill a region defined by lines and Bezier
curves (selectable gray level)
(4) TeX text, including mathematics, can be positioned and superimposed
on the drawing
TeXdraw has been designed to be extensible. Drawing "segments" are
relocatable, self-contained units. Using a combination of the begingroup/
endgroup mechanism in TeX and the gsave/grestore mechanism in PostScript,
drawing segments allow for local changes to the scaling and line
parameters. Using TeX's macro definition capability, new drawing commands
can be constructed from drawing segments.
Renaud Lancelot a écrit :Bonjour Nicolas,
Il y a aussi la possibilité d'utiliser le device pictex (au lieu de postscript, par exemple), disponible dans la distribution standard de R. Voir ?pictex et les exemples d'utilisation. Apparemment, cela pourrait convenir au cas que tu décris (utilisation des mêmes polices, etc.). Cela dit, je n'ai pas testé.
Amicalement,
Renaud
Code : Tout sélectionner
library(aod)
library(lattice)
trellis.device(theme = "col.whitebg")
xyplot(fit ~ Time | Treatment * Site, data = fit, subscripts = TRUE,
xlim = c(-1, 30), ylim = c(0, 1), layout = c(3, 2), aspect = 1,
between = list(x = 1/2, y = 1/2),
xlab = "Time (days)",
ylab = "Predicted proportion of knocked-down flies",
scales = list(y = list(at = seq(0, 1, .25), labels = format(seq(0, 1, .25)))),
panel = function(x, y, subscripts){
panel.grid(col = "grey")
panel.xyplot(x, invlink(y, "logit"), type = "l")
llines(x, invlink(y - 1.96 * fit$se.fit[subscripts], "logit"), lty = 2)
llines(x, invlink(y + 1.96 * fit$se.fit[subscripts], "logit"), lty = 2)
t50 <- unique(fit$T50[subscripts])
lsegments(-1, .5, t50, .5, col = "red")
lsegments(t50, .5, t50, 0, col = "red")
ltext(22, .9, substitute(paste(T["50%"], " = ", xt, " days"), list(xt = format(round(t50, 1), nsmall = 1))),
col = if(t50 > 0) "black" else "red")
})
Code : Tout sélectionner
fit <-
structure(list(Time = as.integer(c(0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30)), Treatment = structure(as.integer(c(1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)), .Label = c("Full spray with rinsing",
"Foot bath without rinsing", "Foot bath with rinsing"), class = "factor"),
Site = structure(as.integer(c(1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2)), .Label = c("Direct", "Indirect"), class = "factor"),
T50 = c(16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
16.2126703993772, 16.2126703993772, 16.2126703993772, 16.2126703993772,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 26.4279849847625,
26.4279849847625, 26.4279849847625, 26.4279849847625, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 2.86476721745895, 2.86476721745895,
2.86476721745895, 2.86476721745895, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 9.1900691686176, 9.1900691686176, 9.1900691686176,
9.1900691686176, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, 0.0646704549961077,
0.0646704549961077, 0.0646704549961077, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844, -5.3842784698844, -5.3842784698844,
-5.3842784698844, -5.3842784698844), fit = c(2.65600365433007,
2.4921809410507, 2.32835822777133, 2.16453551449197, 2.0007128012126,
1.83689008793323, 1.67306737465386, 1.50924466137449, 1.34542194809513,
1.18159923481576, 1.01777652153639, 0.853953808257022, 0.690131094977654,
0.526308381698286, 0.362485668418918, 0.19866295513955, 0.0348402418601816,
-0.128982471419187, -0.292805184698555, -0.456627897977922,
-0.62045061125729, -0.784273324536659, -0.948096037816026,
-1.11191875109539, -1.27574146437476, -1.43956417765413,
-1.6033868909335, -1.76720960421287, -1.93103231749223, -2.09485503077160,
-2.25867774405097, 2.56678042597919, 2.46965684930623, 2.37253327263328,
2.27540969596033, 2.17828611928738, 2.08116254261443, 1.98403896594148,
1.88691538926853, 1.78979181259557, 1.69266823592262, 1.59554465924967,
1.49842108257672, 1.40129750590377, 1.30417392923082, 1.20705035255787,
1.10992677588491, 1.01280319921196, 0.915679622539011, 0.81855604586606,
0.721432469193109, 0.624308892520157, 0.527185315847206,
0.430061739174255, 0.332938162501303, 0.235814585828351,
0.138691009155400, 0.0415674324824484, -0.0555561441905026,
-0.152679720863454, -0.249803297536406, -0.346926874209357,
0.286228647486658, 0.186315242396613, 0.0864018373065673,
-0.0135115677834776, -0.113424972873523, -0.213338377963568,
-0.313251783053613, -0.413165188143658, -0.513078593233704,
-0.612991998323749, -0.712905403413794, -0.812818808503839,
-0.912732213593885, -1.01264561868393, -1.11255902377397,
-1.21247242886402, -1.31238583395407, -1.41229923904411,
-1.51221264413416, -1.6121260492242, -1.71203945431425, -1.81195285940429,
-1.91186626449434, -2.01177966958438, -2.11169307467443,
-2.21160647976447, -2.31151988485452, -2.41143328994456,
-2.51134669503461, -2.61126010012465, -2.7111735052147, 1.94808676686502,
1.73610938877113, 1.52413201067725, 1.31215463258336, 1.10017725448947,
0.888199876395588, 0.676222498301701, 0.464245120207815,
0.252267742113928, 0.0402903640200412, -0.171687014073845,
-0.383664392167732, -0.595641770261618, -0.807619148355505,
-1.01959652644939, -1.23157390454328, -1.44355128263716,
-1.65552866073105, -1.86750603882494, -2.07948341691882,
-2.29146079501271, -2.5034381731066, -2.71541555120048, -2.92739292929437,
-3.13937030738826, -3.35134768548214, -3.56332506357603,
-3.77530244166992, -3.9872798197638, -4.19925719785769, -4.41123457595158,
0.0419838793693923, -0.103294362118078, -0.248572603605548,
-0.393850845093018, -0.539129086580488, -0.684407328067958,
-0.829685569555427, -0.974963811042897, -1.12024205253037,
-1.26552029401784, -1.41079853550531, -1.55607677699278,
-1.70135501848025, -1.84663325996772, -1.99191150145519,
-2.13718974294266, -2.28246798443013, -2.4277462259176, -2.57302446740507,
-2.71830270889254, -2.86358095038001, -3.00885919186748,
-3.15413743335495, -3.29941567484242, -3.44469391632989,
-3.58997215781736, -3.73525039930483, -3.88052864079230,
-4.02580688227977, -4.17108512376724, -4.31636336525471,
-0.797239720864481, -0.945307790769045, -1.09337586067361,
-1.24144393057817, -1.38951200048274, -1.5375800703873, -1.68564814029186,
-1.83371621019643, -1.98178428010099, -2.12985235000555,
-2.27792041991012, -2.42598848981468, -2.57405655971925,
-2.72212462962381, -2.87019269952837, -3.01826076943294,
-3.1663288393375, -3.31439690924207, -3.46246497914663, -3.61053304905119,
-3.75860111895576, -3.90666918886032, -4.05473725876488,
-4.20280532866945, -4.35087339857401, -4.49894146847857,
-4.64700953838314, -4.7950776082877, -4.94314567819227, -5.09121374809683,
-5.23928181800139), se.fit = c(0.631696327625949, 0.595834962089342,
0.561057735003298, 0.527579084321186, 0.495662210246512,
0.465628383334673, 0.437865258172411, 0.412831207043568,
0.3910507063679, 0.373093999736989, 0.359534474808442, 0.350882277635885,
0.347504151326625, 0.349553037272823, 0.35693549107815, 0.369331818237844,
0.386259585488399, 0.407153989354882, 0.431439106897656,
0.458576561896512, 0.488090823032077, 0.5195770089049, 0.552698211580354,
0.587177814833639, 0.622790243684517, 0.659351967670954,
0.69671355316344, 0.734752993392213, 0.773370270752075, 0.812482995707961,
0.852022939358534, 0.599863940521871, 0.574822476218871,
0.55028312232014, 0.526316115818668, 0.503003276675746, 0.480439842684455,
0.458736408024075, 0.438020827325638, 0.418439842523728,
0.400160045441281, 0.383367611620874, 0.368266062552957,
0.355071209101306, 0.344002525794663, 0.335270660048850,
0.329061691392534, 0.325520017066046, 0.324732920713749,
0.326720310963253, 0.331432281035821, 0.338755156042427,
0.348524401002413, 0.360541209792851, 0.374589339597023,
0.390449595001217, 0.407910655229225, 0.426776080138632,
0.446868040951124, 0.4680286027419, 0.490119376745721, 0.51302021154603,
0.459926139812409, 0.432756578341477, 0.407712201403694,
0.385207740459112, 0.365712384950696, 0.349729716729337,
0.337758763145211, 0.330236082916036, 0.327468379998154,
0.329575469958018, 0.336465781258697, 0.347855191967213,
0.363320833781401, 0.38236841266143, 0.404492223415204, 0.429216839914365,
0.456119516781858, 0.48483782089798, 0.515068143663955, 0.546559652482972,
0.579106636024598, 0.61254087138222, 0.646724766342063, 0.681545529474919,
0.716910367587778, 0.752742600510283, 0.788978549234177,
0.825565055426219, 0.862457507005805, 0.899618265210853,
0.937015408556255, 0.515156970749928, 0.484474105556565,
0.455598825178912, 0.428896369955442, 0.404796960122584,
0.383791268523653, 0.366411753049057, 0.353194116396284,
0.34461757217008, 0.341032453509674, 0.342595495814284, 0.349237582835269,
0.360678223467938, 0.376480210117788, 0.396121941381261,
0.419063852394792, 0.444795580498782, 0.472861904350004,
0.502872080003211, 0.534498786916284, 0.567471808718443,
0.601569804987221, 0.636612034885868, 0.672450899142581,
0.70896559624624, 0.746056899754226, 0.783642938325847, 0.821655820895846,
0.860038951061558, 0.89874489304868, 0.93773367451856, 0.464100000767725,
0.442593198493653, 0.423015967088464, 0.405647775649569,
0.390783274700703, 0.378717385527618, 0.369724206449417,
0.364031537077676, 0.361795206654714, 0.363079087181053,
0.367846321113633, 0.375964424891702, 0.38722270340228, 0.401356992831693,
0.418075698622076, 0.437082354117026, 0.458092260577860,
0.480842900062893, 0.505099109382664, 0.530654469948323,
0.557330299797003, 0.584973332799203, 0.61345283235087, 0.642657603527033,
0.672493162524067, 0.702879187578378, 0.733747293990764,
0.765039130349163, 0.796704770232202, 0.828701364349544,
0.86099201625657, 0.474480307213072, 0.453659327350771, 0.436387449294256,
0.423099543559895, 0.414179235198346, 0.409911760295108,
0.410442274670668, 0.415752411532731, 0.425663331523379,
0.439864153076532, 0.457955971431466, 0.479498558525041,
0.504049660981235, 0.5311922920119, 0.560550121488047, 0.591793564984889,
0.624639740702299, 0.658848984989426, 0.69421982226699, 0.730583558181455,
0.767799131668949, 0.805748518427405, 0.844332778325097,
0.883468733691378, 0.923086216729601, 0.963125807395867,
1.00353698261577, 1.04427660480020, 1.08530768745014, 1.12659838575845,
1.16812116939921)), .Names = c("Time", "Treatment", "Site",
"T50", "fit", "se.fit"), row.names = c("1", "2", "3", "4", "5",
"6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16",
"17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27",
"28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38",
"39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49",
"50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60",
"61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71",
"72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82",
"83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93",
"94", "95", "96", "97", "98", "99", "100", "101", "102", "103",
"104", "105", "106", "107", "108", "109", "110", "111", "112",
"113", "114", "115", "116", "117", "118", "119", "120", "121",
"122", "123", "124", "125", "126", "127", "128", "129", "130",
"131", "132", "133", "134", "135", "136", "137", "138", "139",
"140", "141", "142", "143", "144", "145", "146", "147", "148",
"149", "150", "151", "152", "153", "154", "155", "156", "157",
"158", "159", "160", "161", "162", "163", "164", "165", "166",
"167", "168", "169", "170", "171", "172", "173", "174", "175",
"176", "177", "178", "179", "180", "181", "182", "183", "184",
"185", "186"), class = "data.frame")
Retourner vers « Archives : Fonctions graphiques »
Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 1 invité