<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Just in case someone else is also interested in removing titles from subplots, I found that the par function can be used to hide the titles by making them white so they blend into the background (see below).
It would be better to remove them entirely, but changing the color seems to work ok.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Jeremy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal">library(TraMineR)<o:p></o:p></p>
<p class="MsoNormal">library(WeightedCluster)<o:p></o:p></p>
<p class="MsoNormal">data(mvad)<o:p></o:p></p>
<p class="MsoNormal">mvad.alphabet <- c("employment", "FE", "HE", "joblessness", "school", "training")<o:p></o:p></p>
<p class="MsoNormal">mvad.labels <- c("Employment", "Further Education", "Higher Education", "Joblessness", "School", "Training")<o:p></o:p></p>
<p class="MsoNormal">mvad.scodes <- c("EM", "FE", "HE", "JL", "SC", "TR")<o:p></o:p></p>
<p class="MsoNormal">mvadseq <- seqdef(mvad[, 17:86], alphabet = mvad.alphabet, states = mvad.scodes, labels = mvad.labels, weights = mvad$weight, xtstep = 6)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#Defining the custom cost matrix<o:p></o:p></p>
<p class="MsoNormal">subm.custom <- matrix(<o:p></o:p></p>
<p class="MsoNormal"> c(0, 1, 1, 2, 1, 1,<o:p></o:p></p>
<p class="MsoNormal"> 1, 0, 1, 2, 1, 2,<o:p></o:p></p>
<p class="MsoNormal"> 1, 1, 0, 3, 1, 2,<o:p></o:p></p>
<p class="MsoNormal"> 2, 2, 3, 0, 3, 1,<o:p></o:p></p>
<p class="MsoNormal"> 1, 1, 1, 3, 0, 2,<o:p></o:p></p>
<p class="MsoNormal"> 1, 2, 2, 1, 2, 0),<o:p></o:p></p>
<p class="MsoNormal"> nrow = 6, ncol = 6, byrow = TRUE)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">mvaddist1.0 <- seqdist(mvadseq, method = "OM", indel = 1.0, sm = subm.custom)<o:p></o:p></p>
<p class="MsoNormal">pamclust1.0 <- wcKMedRange(mvaddist1.0, kvals = 2:10, weights = mvad$weight)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">par(col.main=”white”)<o:p></o:p></p>
<p class="MsoNormal">seqdplot(mvadseq, group = pamclust1.0$clustering$cluster4, border=NA)<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> traminer-users-bounces@lists.r-forge.r-project.org [mailto:traminer-users-bounces@lists.r-forge.r-project.org]
<b>On Behalf Of </b>Matthias Studer<br>
<b>Sent:</b> Thursday, December 1, 2016 3:03 AM<br>
<b>To:</b> Users questions <traminer-users@lists.r-forge.r-project.org><br>
<b>Subject:</b> Re: [Traminer-users] remove titles from subplots<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="FR-CH" style="color:#1F497D">Hi, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CH" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">This cannot be done using the group argument. You will need to do the plotting separately for each category. For instance, if you want to group according to the gcse5eq covariate which has two levels:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Group <- factor(mvad$gcse5eq)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">par(mfrow=c(nlevels(Group),1)) ##Layout of the plots<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">for(ll in levels(Group)){ ## The plots are done in the same order as levels()<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span style="color:#1F497D">seqdplot(mvadseq[Group==ll, ], with.legend=FALSE, use.layout=FALSE)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Hope this helsp, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Matthias<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="FR">De :</span></b><span lang="FR"> </span><a href="mailto:traminer-users-bounces@lists.r-forge.r-project.org"><span lang="FR">traminer-users-bounces@lists.r-forge.r-project.org</span></a><span lang="FR"> [</span><a href="mailto:traminer-users-bounces@lists.r-forge.r-project.org"><span lang="FR">mailto:traminer-users-bounces@lists.r-forge.r-project.org</span></a><span lang="FR">]
<b>De la part de</b> Reynolds, Jeremy E<br>
<b>Envoyé :</b> mercredi 30 novembre 2016 16:52<br>
<b>À :</b> Users questions <</span><a href="mailto:traminer-users@lists.r-forge.r-project.org"><span lang="FR">traminer-users@lists.r-forge.r-project.org</span></a><span lang="FR">><br>
<b>Objet :</b> [Traminer-users] remove titles from subplots<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="FR-CH"><o:p> </o:p></span></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone know how to remove the subtitles from the subplots that are created with the group option in the seqdplot command? I didn’t see any mention of them in the par help file. Perhaps I have to do this by somehow removing the labels
from the grouping variable? I have pasted code for an example graph below.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jeremy<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">library(TraMineR)<o:p></o:p></p>
<p class="MsoNormal">library(WeightedCluster)<o:p></o:p></p>
<p class="MsoNormal">data(mvad)<o:p></o:p></p>
<p class="MsoNormal">mvad.alphabet <- c("employment", "FE", "HE", "joblessness", "school", "training")<o:p></o:p></p>
<p class="MsoNormal">mvad.labels <- c("Employment", "Further Education", "Higher Education", "Joblessness", "School", "Training")<o:p></o:p></p>
<p class="MsoNormal">mvad.scodes <- c("EM", "FE", "HE", "JL", "SC", "TR")<o:p></o:p></p>
<p class="MsoNormal">mvadseq <- seqdef(mvad[, 17:86], alphabet = mvad.alphabet, states = mvad.scodes, labels = mvad.labels, weights = mvad$weight, xtstep = 6)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#Defining the custom cost matrix<o:p></o:p></p>
<p class="MsoNormal">subm.custom <- matrix(<o:p></o:p></p>
<p class="MsoNormal"> c(0, 1, 1, 2, 1, 1,<o:p></o:p></p>
<p class="MsoNormal"> 1, 0, 1, 2, 1, 2,<o:p></o:p></p>
<p class="MsoNormal"> 1, 1, 0, 3, 1, 2,<o:p></o:p></p>
<p class="MsoNormal"> 2, 2, 3, 0, 3, 1,<o:p></o:p></p>
<p class="MsoNormal"> 1, 1, 1, 3, 0, 2,<o:p></o:p></p>
<p class="MsoNormal"> 1, 2, 2, 1, 2, 0),<o:p></o:p></p>
<p class="MsoNormal"> nrow = 6, ncol = 6, byrow = TRUE)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">mvaddist1.0 <- seqdist(mvadseq, method = "OM", indel = 1.0, sm = subm.custom)<o:p></o:p></p>
<p class="MsoNormal">pamclust1.0 <- wcKMedRange(mvaddist1.0, kvals = 2:10, weights = mvad$weight)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">seqdplot(mvadseq, group = pamclust1.0$clustering$cluster4, border=NA)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-bottom:solid windowtext 1.5pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Dr. Jeremy Reynolds<o:p></o:p></p>
<p class="MsoNormal">Professor<o:p></o:p></p>
<p class="MsoNormal">309 Stone Hall <o:p></o:p></p>
<p class="MsoNormal">Department of Sociology<o:p></o:p></p>
<p class="MsoNormal">700 W. State Street<o:p></o:p></p>
<p class="MsoNormal">Purdue University <o:p></o:p></p>
<p class="MsoNormal">West Lafayette, IN 47907 <o:p></o:p></p>
<p class="MsoNormal">Phone: (765) 496-3348 <o:p></o:p></p>
<p class="MsoNormal"><a href="https://www.cla.purdue.edu/sociology/directory/index.aspx?p=Jeremy_Reynolds">https://www.cla.purdue.edu/sociology/directory/index.aspx?p=Jeremy_Reynolds</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>