<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<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>
</HEAD>
<BODY>
<!-- 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 <Matthias.Studer@unige.ch><BR>
Subject: Re: [Traminer-users] seqrplot: Error in plot.new() : figure<BR>
margins too large<BR>
To: Users questions <traminer-users@r-forge.wu-wien.ac.at><BR>
Message-ID: <4D7897A7.9060608@unige.ch><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>
>> Traminer-users@lists.r-forge.r-project.org<BR>
>> <A 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>
> Traminer-users@lists.r-forge.r-project.org<BR>
> <A 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 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>
Traminer-users@lists.r-forge.r-project.org<BR>
<A 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>
</FONT>
</P>
</BODY>
</HTML>