Pie charts colours

77 views
Skip to first unread message

Valentina Todisco

unread,
Mar 24, 2024, 9:17:11 AM3/24/24
to BioGeoBEARS
Hello,

How can I change the colours of the pie charts to have them with colours more distinct?
I followed a previous suggestion that I found in the group but didn't work.

Thank you
Valentina

Nick Matzke

unread,
Mar 24, 2024, 5:45:18 PM3/24/24
to bioge...@googlegroups.com
Hi --

plot_BioGeoBEARS_results(results_object, analysis_titletxt, addl_params=list("j"), plotwhat="text", label.offset=0.45, tipcex=0.7, statecex=0.7, splitcex=0.6, titlecex=0.8, plotsplits=TRUE, cornercoords_loc=scriptdir, include_null_range=TRUE, tr=tr, tipranges=tipranges)

...has additional options, if you type

plot_BioGeoBEARS_results

and hit return you will see the full code. Basically, set colors_list_for_states=c("red1","red2",...) as you like -- you have to make sure the list is the same length as the list of your states/ranges...

Cheers!
Nick


--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeobears/6286777e-4211-427b-8394-950be1a3b99bn%40googlegroups.com.

Valentina Todisco

unread,
Mar 26, 2024, 5:37:47 PM3/26/24
to bioge...@googlegroups.com
In particular it says "Errore in rangestxt_to_colors(possible_ranges_list_txt, colors_list_for_states, : 
  Error: possible_ranges_list_txt and colors_list_for_states must be the same length".

Thank you again
V

--
You received this message because you are subscribed to a topic in the Google Groups "BioGeoBEARS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/biogeobears/uNRzvIsNYwA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to biogeobears...@googlegroups.com.

Nick Matzke

unread,
Mar 26, 2024, 5:39:40 PM3/26/24
to BioGeoBEARS
On Wednesday, March 27, 2024 at 10:37:47 AM UTC+13 valentin...@gmail.com wrote:
In particular it says "Errore in rangestxt_to_colors(possible_ranges_list_txt, colors_list_for_states, : 
Error: possible_ranges_list_txt and colors_list_for_states must be the same length".
Thank you againV

Hi -- that error means what it says.  Do 

length(possible_ranges_list_txt)
length(colors_list_for_states)

...they must be the same.  I think these issues are just all about carefully tracking what exactly is in the list of possible ranges/states, the list of colors for each range/state, etc...

Cheers!
Nick
Reply all
Reply to author
Forward
0 new messages