[R] plotly question

CALUM POLWART po|c1410 @end|ng |rom gm@||@com
Sat Jul 22 11:36:28 CEST 2023


I was just replying to say which bit do you consider the indicator.

But I see Boris has provided a Chat GPT solution.

Running it hopefully shows you how to change colours on various parts.



On Fri, 21 Jul 2023, 22:43 Jeff Newmiller, <jdnewmil using dcn.davis.ca.us> wrote:

> plotly is _not_ associated with posit. I think you are unlikely to find
> expertise with plotly in their forums. You might find help at
> stackoverflow.com.
>
> On July 21, 2023 1:40:49 PM PDT, Bert Gunter <bgunter.4567 using gmail.com>
> wrote:
> >As you apparently haven't received any responses yet, I'll try to
> >suggest something useful. However, I have absolutely zero experience
> >with plotly, so this is just from general principles and reading the
> >plot_ly Help file, which says for the "..." arguments:
> >
> >"Arguments (i.e., attributes) passed along to the trace type. See
> >schema() for a list of acceptable attributes for a given trace type
> >(by going to traces -> type -> attributes). Note that attributes
> >provided at this level may override other arguments (e.g. plot_ly(x =
> >1:10, y = 1:10, color = I("red"), marker = list(color = "blue")))."
> >
> >So I would **guess** that you needs to go to ?schema to see if the
> >further attributes of your "gauge" type that you wish to change are
> >there.
> >
> >Alternatively, plotly is a package from posit.co, formerly RStudio;
> >they have an extensive support site and community here:
> >https://posit.co/support/
> >So you may have success there.
> >
> >Finally, I assume you have tried web searching appropriate search
> >queries, but if not, you should do so. It is sometimes surprising how
> >much you can find that way.
> >
> >... and, again, apologies if my ignorance means my suggestions are
> useless.
> >
> >Cheers,
> >Bert
> >
> >
> >On Fri, Jul 21, 2023 at 6:19 AM Thomas Subia via R-help
> ><r-help using r-project.org> wrote:
> >>
> >> Colleagues
> >>
> >> Here is my reproducible code
> >>
> >> plot_ly(
> >>   domain = list(x = c(0, 1), y = c(0, 1)),
> >>   value = 2874,
> >>   title = list(text = "Generic"),
> >>   type = "indicator",
> >>   mode = "gauge+number+delta",
> >>   delta = list(reference = 4800),
> >>   gauge = list(
> >>     axis =list(range = list(NULL, 5000)),
> >>     steps = list(
> >>     list(range = c(0, 4800), color = "white"),
> >>     list(range = c(4800, 6000), color = "red")),
> >>     threshold = list(
> >>     line = list(color = "black", width = 6),
> >>     thickness = 0.75,
> >>     value = 4800)))
> >>
> >> How can I change the indicator color from green to some other color?
> >>
> >> How can I change the typeface and font size of the speedometer tick
> mark font size?
> >>
> >> Thomas Subia
> >>
> >>         [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
> >______________________________________________
> >R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
> --
> Sent from my phone. Please excuse my brevity.
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list