* Re: [9fans] alg to make a good colour palette for a graph
[not found] <3106177662@snellwilcox.com>
@ 2003-02-21 10:03 ` Steve Simon
2003-02-21 12:58 ` [9fans] " Jim Choate
0 siblings, 1 reply; 6+ messages in thread
From: Steve Simon @ 2003-02-21 10:03 UTC (permalink / raw)
To: 9fans
Hi,
I picked up somecode from Graphics gems to do this,
it was good enough for me though I wouldn't vouch
the optimal-ness of its solution.
The file is colorquant.c, I cannot find which volume of
gems its from but I could send you the code if you like.
-Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* [9fans] Re: alg to make a good colour palette for a graph
2003-02-21 10:03 ` [9fans] alg to make a good colour palette for a graph Steve Simon
@ 2003-02-21 12:58 ` Jim Choate
0 siblings, 0 replies; 6+ messages in thread
From: Jim Choate @ 2003-02-21 12:58 UTC (permalink / raw)
To: 9fans
On Fri, 21 Feb 2003, Steve Simon wrote:
> I picked up somecode from Graphics gems to do this,
> it was good enough for me though I wouldn't vouch
> the optimal-ness of its solution.
>
> The file is colorquant.c, I cannot find which volume of
> gems its from but I could send you the code if you like.
Google is your friend, all the code from all five volumes is available on
the web at the Graphics Gem homesite, which by the way will take you to
their e-zine on graphics related topics.
--
____________________________________________________________________
We are all interested in the future for that is where you and I
are going to spend the rest of our lives.
Criswell, "Plan 9 from Outer Space"
ravage@ssz.com jchoate@open-forge.org
www.ssz.com www.open-forge.org
--------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] output of ps(1) memory usage
@ 2003-02-21 5:47 YAMANASHI Takeshi
2003-02-21 5:55 ` Russ Cox
0 siblings, 1 reply; 6+ messages in thread
From: YAMANASHI Takeshi @ 2003-02-21 5:47 UTC (permalink / raw)
To: 9fans
> > Is there an easy way to determine the amount of memory
> > really inuse (or physically mapped?) within a process?
>
> cat /proc/<pid>/segment. The first number is the
Thank you, all.
I have mistakenly thought that the output of ps/segment
concerns about the virtual memory, not physically mapped.
Now that I understand the ps/segment output correctly,
I revise my question as follows:
Is there a way to determine the amount of swapped pages
of a process? I just want to complete the equation,
virutal memory usage of a process =
swapped or not paged in + physically mapped
--
YAMANASHI Takeshi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] output of ps(1) memory usage
2003-02-21 5:47 [9fans] output of ps(1) memory usage YAMANASHI Takeshi
@ 2003-02-21 5:55 ` Russ Cox
2003-02-21 6:08 ` [9fans] alg to make a good colour palette for a graph George Michaelson
0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2003-02-21 5:55 UTC (permalink / raw)
To: 9fans
/proc/pid/segment shows you virtual memory allocation,
not physical. There is no way to find out which pages
in a process are swapped and which are not at a per-page
granularity. Of course, if /dev/swap tells you nothing is
swapped out, then nothing is swapped out. It is also hard
to tell what is not yet paged in.
You could walk around in the kernel's page tables,
but that's not portable and not very clean.
Russ
^ permalink raw reply [flat|nested] 6+ messages in thread
* [9fans] alg to make a good colour palette for a graph
2003-02-21 5:55 ` Russ Cox
@ 2003-02-21 6:08 ` George Michaelson
2003-02-21 6:39 ` Eric Grosse
2003-02-21 7:46 ` Skip Tavakkolian
0 siblings, 2 replies; 6+ messages in thread
From: George Michaelson @ 2003-02-21 6:08 UTC (permalink / raw)
To: 9fans
totally non Plan9 question but people here oftentimes have nice simple algs
which work well across lots of contexts.
I need to make a set of <n> visually distinctive colours in rgb space such
that I can feed the rgb values into a tool (RRD) to graph with.
Microsloth picks colours for you. a very nasty muted set. Gnuplot repeats the
same palette of colours over and over again.
I read in the RRD list of a technique to map the <n> as equidistant points
distributed in HSV space, and then use them. But, no code.
N varies. Usually its less than 15. In those cases I think I can use an
Acronymic 'Richard Of York Gave Battle In Vain' selection. But for one case I
am looking at, I need 250+ reasonably distinctive colours.
I thought about just taking a 256colourmap, and randomizing it, and using the
entire palette that way. It should mean no two adjacent colours are very alike
which is fine for a stacked line chart.
Is there something simple and nice, which I can do in AWK? Something which
will go into the ff-space and pick good colour combos? The obvious things I
come up with make gray (for a stunningly obvious reason) It would be super
nice to have up to 25 or 30 colours which are all mutually equi-distant in
some sense.
clues? I've tried web browsing. its phenominal how few things seem remotely
relevant from keyword searches using colourspace, colourmap, palette, graph.
-George
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-02-21 12:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3106177662@snellwilcox.com>
2003-02-21 10:03 ` [9fans] alg to make a good colour palette for a graph Steve Simon
2003-02-21 12:58 ` [9fans] " Jim Choate
2003-02-21 5:47 [9fans] output of ps(1) memory usage YAMANASHI Takeshi
2003-02-21 5:55 ` Russ Cox
2003-02-21 6:08 ` [9fans] alg to make a good colour palette for a graph George Michaelson
2003-02-21 6:39 ` Eric Grosse
2003-02-21 6:57 ` George Michaelson
2003-02-21 7:46 ` Skip Tavakkolian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).