<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Dear Jane,<br>
    <br>
    Usually, your data are loaded in a data.frame, an object containing
    all your covariates (probably the object you gave to seqdef).
    Suppose that this data.frame was named mydata. You can run the
    following command<br>
    <br>
    table(cluster6, mydata$female)<br>
    <br>
    You can also use the female covariate in seqfplot (or any seq*plot
    functions) with the following<br>
    <br>
    seqfplot(Org.seq, group=mydata$female)<br>
    <br>
    You can use two covariates at the same time with the interaction
    function<br>
    <br>
    seqfplot(Org.seq, group=interaction(cluster6, mydata$female))<br>
    <br>
    With the mvad data set this could be <br>
    library(TraMineR)<br>
    data(mvad)<br>
    ## mvad is the data.frame<br>
    mvad.labels &lt;- c("employment", "further education", "higher
    education", <br>
    &nbsp;&nbsp;&nbsp; "joblessness", "school", "training")<br>
    mvad.scodes &lt;- c("EM", "FE", "HE", "JL", "SC", "TR")<br>
    mvad.seq &lt;- seqdef(mvad, 15:86, states = mvad.scodes, labels =
    mvad.labels)<br>
    <br>
    ## Grouping with male information<br>
    seqfplot(mvad.seq, group=mvad$male)<br>
    <br>
    ## Grouping using an interaction male and unemployed father<br>
    seqfplot(mvad.seq, group=interaction(mvad$male, mvad$funemp))<br>
    <br>
    Hope this helps.<br>
    Matthias Studer<br>
    <br>
    Le 10.03.2011 22:31, Jane K. Ohgami a &eacute;crit&nbsp;:
    <blockquote
cite="mid:E42C05C67BC8AE4099E2DE22EC0A3C3A6FF79F@LAW-BE3.law.georgetown.edu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="MS Exchange Server version
        6.5.7654.12">
      <title>FW: seqrplot: Error in plot.new() : figure margins too
        large</title>
      <!-- Converted from text/plain format -->
      <p><font size="2">I appreciate the explanations-they have been
          helpful.<br>
          <br>
          I have one more question regarding options for the seqfplot
          commands. Is it possible to compare the graphs by another
          variable such as gender?<br>
          Or alternatively with a simple [table] command so that I can
          determine how many fall into each cluster?<br>
          <br>
          For example:<br>
          table(cluster6, female)<br>
          <br>
          yields: Error in table&nbsp; : object 'female' not found<br>
          which I understand to be because 'female' is in my larger data
          set but not my sequence data set?<br>
          <br>
          Again, many thanks for your help!<br>
          <br>
          Regards,<br>
          Jane<br>
          <br>
          ------------------------------<br>
          <br>
          Date: Thu, 10 Mar 2011 10:19:35 +0100<br>
          From: Matthias Studer <a class="moz-txt-link-rfc2396E" href="mailto:Matthias.Studer@unige.ch">&lt;Matthias.Studer@unige.ch&gt;</a><br>
          Subject: Re: [Traminer-users] seqrplot: Error in plot.new() :
          figure<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; margins too&nbsp;&nbsp;&nbsp;&nbsp; large<br>
          To: Users questions
          <a class="moz-txt-link-rfc2396E" href="mailto:traminer-users@r-forge.wu-wien.ac.at">&lt;traminer-users@r-forge.wu-wien.ac.at&gt;</a><br>
          Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:4D7897A7.9060608@unige.ch">&lt;4D7897A7.9060608@unige.ch&gt;</a><br>
          Content-Type: text/plain; charset="windows-1252";
          Format="flowed"<br>
          <br>
          Dear Jane,<br>
          <br>
          The problems is that the margins of your plot are too large
          and that<br>
          there is not enough space to plot it (and to plot what is
          inside the<br>
          margins). This error appears sometimes on windows if your plot
          window is<br>
          too small. You may try to maximize it before plotting. Another
          solution<br>
          would be to plot into a pdf with an appropriate size (maybe
          try several<br>
          values of width and height)<br>
          <br>
          pdf(file="myplot.pdf", width=20, height=20)<br>
          seqmtplot(Org.seq, group=co.fac)<br>
          dev.off()<br>
          <br>
          Finally, another solution would be to reduce the margins using
          the "par"<br>
          command (see the help of "par" for more details) for instance:<br>
          <br>
          par(mar = c(1,1,1,1))<br>
          seqmtplot(Org.seq, group=co.fac)<br>
          <br>
          Let us know if it fixed your problem.<br>
          All the best,<br>
          <br>
          Matthias Studer<br>
          <br>
          Le 09.03.2011 16:27, Alexis Gabadinho a ?crit :<br>
          &gt; Dear Jane,<br>
          &gt;<br>
          &gt; I tried to reproduce the problem by creating an
          artificial sequence<br>
          &gt; data set and a clustering variable with the same
          characteristics as yours:<br>
          &gt;<br>
          &gt; library(TraMineR)<br>
          &gt;<br>
          &gt; co.fac &lt;- rep(paste("Gr",1:8, sep=""), 500)<br>
          &gt; ex &lt;- seqgen(4000, 120, 1:10)<br>
          &gt; Org.seq &lt;- seqdef(ex)<br>
          &gt;<br>
          &gt; ## mean time plot<br>
          &gt; seqmtplot(Org.seq, group=co.fac)<br>
          &gt;<br>
          &gt; The code above works perfectly both on Linux (R 2.10) and
          Windows (R<br>
          &gt; 2.12). You can try it on your computer. If you get an
          error with this<br>
          &gt; code, could you tell me which R and TraMineR versions you
          use ?<br>
          &gt;<br>
          &gt; Moreover I see an error in your "seqrplot" code :<br>
          &gt;<br>
          &gt; seqrplot(Org.seq, group = co.fac, co.fac, border=NA)<br>
          &gt;<br>
          &gt; You have to provide a distance matrix (created with
          "seqdist()") for<br>
          &gt; plotting representative sequences, and instead you pass
          "co.fac"<br>
          &gt; again. Your code should look like this (replace
          "my.dist.matrix" by<br>
          &gt; the name of your distance matrix):<br>
          &gt;<br>
          &gt; seqrplot(Org.seq, group = co.fac, dist.matrix=
          my.dist.matrix , border=NA)<br>
          &gt;<br>
          &gt; Sometimes, if a graphic window is open and an error
          occurs with the<br>
          &gt; plotting function, you have to close the graphic window
          before running<br>
          &gt; the corrected code again.<br>
          &gt;<br>
          &gt; Let me know if this is the solution to your problem.<br>
          &gt;<br>
          &gt; Best,<br>
          &gt; Alexis.<br>
          &gt;<br>
          &gt;<br>
          &gt;<br>
          &gt; Le 08. 03. 11 21:08, Jane K. Ohgami a ?crit :<br>
          &gt;&gt;<br>
          &gt;&gt; I am new to TraMineR and have what is probably a very
          basic question<br>
          &gt;&gt; regarding plot/graphing commands for cluster
          analysis.<br>
          &gt;&gt; I am analyzing career transitions and my data set
          consists of<br>
          &gt;&gt;<br>
          &gt;&gt;&nbsp; [&gt;] 3842 sequences with 10 distinct events/states<br>
          &gt;&gt;&nbsp; [&gt;] 2590 distinct sequences<br>
          &gt;&gt;&nbsp; [&gt;] min/max sequence length: 120/120<br>
          &gt;&gt;<br>
          &gt;&gt; Trying to exercise the following syntax:<br>
          &gt;&gt; seqmtplot(Org.seq, group = co.fac, border=NA) or<br>
          &gt;&gt; seqrplot(Org.seq, group = co.fac, co.fac, border=NA)<br>
          &gt;&gt;<br>
          &gt;&gt; I get the following error message:<br>
          &gt;&gt; &gt;Error in plot.new() : figure margins too large<br>
          &gt;&gt;<br>
          &gt;&gt; I have unsuccessfully tried to adjust for this so
          would appreciate<br>
          &gt;&gt; any suggestions. Basically I need to figure out how
          my 8 clusters<br>
          &gt;&gt; break down. Any suggestions/advice would be greatly
          appreciated.<br>
          &gt;&gt; Thank you!<br>
          &gt;&gt;<br>
          &gt;&gt;<br>
          &gt;&gt; _______________________________________________<br>
          &gt;&gt; Traminer-users mailing list<br>
          &gt;&gt; <a class="moz-txt-link-abbreviated" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a><br>
          &gt;&gt; <a moz-do-not-send="true"
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br>
          &gt;<br>
          &gt;<br>
          &gt; _______________________________________________<br>
          &gt; Traminer-users mailing list<br>
          &gt; <a class="moz-txt-link-abbreviated" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a><br>
          &gt; <a moz-do-not-send="true"
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br>
          -------------- next part --------------<br>
          An HTML attachment was scrubbed...<br>
          URL: &lt;<a moz-do-not-send="true"
href="http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20110310/209c988a/attachment-0001.htm">http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20110310/209c988a/attachment-0001.htm</a>&gt;<br>
          <br>
          ------------------------------<br>
          <br>
          _______________________________________________<br>
          Traminer-users mailing list<br>
          <a class="moz-txt-link-abbreviated" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a><br>
          <a moz-do-not-send="true"
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br>
          <br>
          <br>
          End of Traminer-users Digest, Vol 8, Issue 3<br>
          ********************************************<br>
          <br>
          <br>
        </font>
      </p>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Traminer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a>
</pre>
    </blockquote>
  </body>
</html>