Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2487 > unrolled thread
| Started by | Kalin Kozhuharov <me.kalin@gmail.com> |
|---|---|
| First post | 2014-06-14 08:41 -0700 |
| Last post | 2014-06-15 17:37 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Any way to output multi-color strings in gnuplot? Kalin Kozhuharov <me.kalin@gmail.com> - 2014-06-14 08:41 -0700
Re: Any way to output multi-color strings in gnuplot? Kalin Kozhuharov <me.kalin@gmail.com> - 2014-06-15 07:56 -0700
Re: Any way to output multi-color strings in gnuplot? Karl <mail.kfr@gmx.net> - 2014-06-15 17:37 +0200
| From | Kalin Kozhuharov <me.kalin@gmail.com> |
|---|---|
| Date | 2014-06-14 08:41 -0700 |
| Subject | Any way to output multi-color strings in gnuplot? |
| Message-ID | <8b66dacb-fe79-4345-be81-55f5b73288ca@googlegroups.com> |
For example the string "R G B" as title, with each letter colored in its color? I am working on some visualization for radiation data from Safecast fixed sensors and was wondering if it will be better to color the title the way axes are colored (dark-green CPM and blue μSv/h)? Output: http://gamma.tar.bz/nGeigies/ Code: https://github.com/thinrope/fixed_sensor_visualization I figured out how to use enhanced text to change font and size mid-string, is there anything like that for color? Or a way to pre-render several colored stings, then output them stuck together (say as centered title). Any other comments on having the graphs more easy to understand/better looking are welcome. Cheers, Kalin.
[toc] | [next] | [standalone]
| From | Kalin Kozhuharov <me.kalin@gmail.com> |
|---|---|
| Date | 2014-06-15 07:56 -0700 |
| Message-ID | <19bb7c89-9cb1-47b4-95ee-11f0a2646d05@googlegroups.com> |
| In reply to | #2487 |
On Sunday, June 15, 2014 12:41:37 AM UTC+9, Kalin Kozhuharov wrote:
> For example the string "R G B" as title, with each letter colored in its color?
>
Well, I found a hackish way that works...
To replace the commented title with colored version:
#set title CPM . "; " . measurements ."; " . uSv_h font FONT . ",9";
set title "&{title}" font FONT . ",9";
set label 41 "" . CPM . "; &{" . measurements ."; " . uSv_h . "}" at graph 0.5, graph 1.1 center font FONT . ",9" textcolor rgb "dark-green";
set label 42 "&{" . CPM . "; }" . measurements ."; &{" . uSv_h . "}" at graph 0.5, graph 1.1 center font FONT . ",9" textcolor rgb "black";
set label 43 "&{" . CPM . "; " . measurements ."; }" . uSv_h . "" at graph 0.5, graph 1.1 center font FONT . ",9" textcolor rgb "blue";
Any better/less cumbersome approach?
Kalin.
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-06-15 17:37 +0200 |
| Message-ID | <lnkemf$ebc$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2488 |
Am 15.06.2014 16:56, schrieb Kalin Kozhuharov:
> On Sunday, June 15, 2014 12:41:37 AM UTC+9, Kalin Kozhuharov wrote:
>> For example the string "R G B" as title, with each letter colored in its color?
>>
> Well, I found a hackish way that works...
>
> To replace the commented title with colored version:
>
> #set title CPM . "; " . measurements ."; " . uSv_h font FONT . ",9";
> set title "&{title}" font FONT . ",9";
> set label 41 "" . CPM . "; &{" . measurements ."; " . uSv_h . "}" at graph 0.5, graph 1.1 center font FONT . ",9" textcolor rgb "dark-green";
> set label 42 "&{" . CPM . "; }" . measurements ."; &{" . uSv_h . "}" at graph 0.5, graph 1.1 center font FONT . ",9" textcolor rgb "black";
> set label 43 "&{" . CPM . "; " . measurements ."; }" . uSv_h . "" at graph 0.5, graph 1.1 center font FONT . ",9" textcolor rgb "blue";
>
>
> Any better/less cumbersome approach?
> Kalin.
>
I think the only way to do it is with several labels, until someone
implements colours into the enhanced text mode.
This here looks a bit less ugly:
firsttext = "abc"; firstcolor = "red"
secondtext = "def"; secondcolor = "green"
thirdtext = "ghi"; thirdcolor = "blue
set label 4 firsttext at 4,0 textcolor rgb firstcolor
set label 5 "&{".firsttext."}".secondtext \
at 4,0 textcolor rgb secondcolor
set label 6 "&{".firsttext.secondtext."}".thirdtext \
at 4,0 textcolor rgb thirdcolor
Karl
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web