Plotting options with procD.allometry?

255 views
Skip to first unread message

Jeremy Gibson

unread,
Sep 5, 2017, 6:05:30 AM9/5/17
to geomorph R package
Hi Geomorph community,

This might be a simple r question, or it might be specific to geomorph; in any case pardon my ignorance as I'm fairly new to both r and geomorph. I have a figure (see below) and I am having some difficulty with reformatting it.

The code that generates the plot
par(cex.lab=1.5)
plot(mydata, method = "PredLine")
title('The effect of size on shape by population') 

Using par(), I am able to adjust the axis label size using cex.lab and I can even increase the line size of the series elements and the graph box with lwd; but I have not figured out how to alter the series shape or element size.

In the above par(cex.lab=1.5) command, if I rerun the code with the following adjustments: par(cex.lab=1.5, pch=19, cex=2) it will produce the exact same figure (below). and if I look at all of the par() settings using par(no.readonly = T) - both pch and cex are set to the values I set despite the plot printing out pch = 5 and cex = 1 (that's my guess as I can't see if these are actually set to those values)

It was also be helpful to either mute the group text, or also change its size - but again I can't figure out how to do that either.

Any help in customizing this figure would be extremely appreciated as I've wasted several hours on this problem.

Thanks,
Jeremy


Antigoni Kaliontzopoulou

unread,
Sep 5, 2017, 7:15:02 AM9/5/17
to geomorph-...@googlegroups.com
Dear Jeremy,

being a quick, automatic tool for reviewing allometric data, plot.procD.allometry has predefined options for the plotting arguments pch and cex which cannot be overridden. 

For producing more elaborate graphs with specific plotting options, I would recommend using the predicted values provided in the output of the procD.allometry function ($pred.val component of the object) to build the plot by hand, with the graphic options you prefer.

All the best,
Antigoni

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-r-package@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/ca49d687-5cae-4e9e-a474-1a4b814469dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


Antigoni Kaliontzopoulou

Assistant Researcher
CIBIO/InBIO, Centro de Investigação em Biodiversidade e Recursos Genéticos
University of Porto
Campus Agrário de Vairão, 4485-661 Vairão
PORTUGAL

http://antigonik.wix.com/akaliontzopoulou
http://cibio.up.pt/people/details/akaliont
http://aphylogenetics.wix.com/phylogenetics

Jeremy Gibson

unread,
Sep 5, 2017, 7:43:22 AM9/5/17
to geomorph R package
Antigoni,

Yeah, I just started pulling out the data that is actually being plotted in plot.procD.allometry. Thanks for the quick reply - much appreciated...

Cheers,
Jeremy


On Tuesday, September 5, 2017 at 12:15:02 PM UTC+1, Antigoni Kaliontzopoulou wrote:
Dear Jeremy,

being a quick, automatic tool for reviewing allometric data, plot.procD.allometry has predefined options for the plotting arguments pch and cex which cannot be overridden. 

For producing more elaborate graphs with specific plotting options, I would recommend using the predicted values provided in the output of the procD.allometry function ($pred.val component of the object) to build the plot by hand, with the graphic options you prefer.

All the best,
Antigoni
On Tue, Sep 5, 2017 at 11:05 AM, Jeremy Gibson <jeremy....@gmail.com> wrote:
Hi Geomorph community,

This might be a simple r question, or it might be specific to geomorph; in any case pardon my ignorance as I'm fairly new to both r and geomorph. I have a figure (see below) and I am having some difficulty with reformatting it.

The code that generates the plot
par(cex.lab=1.5)
plot(mydata, method = "PredLine")
title('The effect of size on shape by population') 

Using par(), I am able to adjust the axis label size using cex.lab and I can even increase the line size of the series elements and the graph box with lwd; but I have not figured out how to alter the series shape or element size.

In the above par(cex.lab=1.5) command, if I rerun the code with the following adjustments: par(cex.lab=1.5, pch=19, cex=2) it will produce the exact same figure (below). and if I look at all of the par() settings using par(no.readonly = T) - both pch and cex are set to the values I set despite the plot printing out pch = 5 and cex = 1 (that's my guess as I can't see if these are actually set to those values)

It was also be helpful to either mute the group text, or also change its size - but again I can't figure out how to do that either.

Any help in customizing this figure would be extremely appreciated as I've wasted several hours on this problem.

Thanks,
Jeremy


--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.

Antigoni Kaliontzopoulou

unread,
Sep 5, 2017, 10:30:45 AM9/5/17
to geomorph-...@googlegroups.com
Jeremy,

I have now modified the plot.procD.allometry function to allow the user to directly set all basic plotting arguments, including cex, pch, bg and col. If you install the beta version of geomorph from the develop branch of github (see https://github.com/geomorphR/geomorph/wiki/Installing-geomorph for details), you are now able to make the plots you wanted directly using plot() on your procD.allometry object.

Thanks for bringing this to our attention :)
Antigoni

To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsubscribe@googlegroups.com.



--


Antigoni Kaliontzopoulou

Assistant Researcher
CIBIO/InBIO, Centro de Investigação em Biodiversidade e Recursos Genéticos
University of Porto
Campus Agrário de Vairão, 4485-661 Vairão
PORTUGAL

http://antigonik.wix.com/akaliontzopoulou
http://cibio.up.pt/people/details/akaliont
http://aphylogenetics.wix.com/phylogenetics

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-r-package@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages