<!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 <- c("employment", "further education", "higher
education", <br>
"joblessness", "school", "training")<br>
mvad.scodes <- c("EM", "FE", "HE", "JL", "SC", "TR")<br>
mvad.seq <- 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 écrit :
<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 : 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"><Matthias.Studer@unige.ch></a><br>
Subject: Re: [Traminer-users] seqrplot: Error in plot.new() :
figure<br>
margins too large<br>
To: Users questions
<a class="moz-txt-link-rfc2396E" href="mailto:traminer-users@r-forge.wu-wien.ac.at"><traminer-users@r-forge.wu-wien.ac.at></a><br>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:4D7897A7.9060608@unige.ch"><4D7897A7.9060608@unige.ch></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>
> Dear Jane,<br>
><br>
> I tried to reproduce the problem by creating an
artificial sequence<br>
> data set and a clustering variable with the same
characteristics as yours:<br>
><br>
> library(TraMineR)<br>
><br>
> co.fac <- rep(paste("Gr",1:8, sep=""), 500)<br>
> ex <- seqgen(4000, 120, 1:10)<br>
> Org.seq <- seqdef(ex)<br>
><br>
> ## mean time plot<br>
> seqmtplot(Org.seq, group=co.fac)<br>
><br>
> The code above works perfectly both on Linux (R 2.10) and
Windows (R<br>
> 2.12). You can try it on your computer. If you get an
error with this<br>
> code, could you tell me which R and TraMineR versions you
use ?<br>
><br>
> Moreover I see an error in your "seqrplot" code :<br>
><br>
> seqrplot(Org.seq, group = co.fac, co.fac, border=NA)<br>
><br>
> You have to provide a distance matrix (created with
"seqdist()") for<br>
> plotting representative sequences, and instead you pass
"co.fac"<br>
> again. Your code should look like this (replace
"my.dist.matrix" by<br>
> the name of your distance matrix):<br>
><br>
> seqrplot(Org.seq, group = co.fac, dist.matrix=
my.dist.matrix , border=NA)<br>
><br>
> Sometimes, if a graphic window is open and an error
occurs with the<br>
> plotting function, you have to close the graphic window
before running<br>
> the corrected code again.<br>
><br>
> Let me know if this is the solution to your problem.<br>
><br>
> Best,<br>
> Alexis.<br>
><br>
><br>
><br>
> Le 08. 03. 11 21:08, Jane K. Ohgami a ?crit :<br>
>><br>
>> I am new to TraMineR and have what is probably a very
basic question<br>
>> regarding plot/graphing commands for cluster
analysis.<br>
>> I am analyzing career transitions and my data set
consists of<br>
>><br>
>> [>] 3842 sequences with 10 distinct events/states<br>
>> [>] 2590 distinct sequences<br>
>> [>] min/max sequence length: 120/120<br>
>><br>
>> Trying to exercise the following syntax:<br>
>> seqmtplot(Org.seq, group = co.fac, border=NA) or<br>
>> seqrplot(Org.seq, group = co.fac, co.fac, border=NA)<br>
>><br>
>> I get the following error message:<br>
>> >Error in plot.new() : figure margins too large<br>
>><br>
>> I have unsuccessfully tried to adjust for this so
would appreciate<br>
>> any suggestions. Basically I need to figure out how
my 8 clusters<br>
>> break down. Any suggestions/advice would be greatly
appreciated.<br>
>> Thank you!<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>
> _______________________________________________<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>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<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>><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>