comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Plotting points in fainter color on an IDL plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Plotting points in fainter color on an IDL plot [message #86510] Fri, 15 November 2013 03:08 Go to next message
Kaushal Sharma is currently offline  Kaushal Sharma
Messages: 12
Registered: August 2013
Junior Member
Hello, I have a scatter plot in which there are some points which represent more reliable determinations than others. I want to plot both kinds of points in the same color but the less reliable ones in paler colors. In a sense, I want to change the brightness of few points on the plot. Is it possible in IDL? I am using color table 13 and plot and oplot procedure of IDL.


Thanks for the help,
Kaushal
Re: Plotting points in fainter color on an IDL plot [message #86513 is a reply to message #86510] Fri, 15 November 2013 06:21 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kaushal Sharma writes:

> Hello, I have a scatter plot in which there are some points which represent more reliable determinations than others. I want to plot both kinds of points in the same color but the less reliable ones in paler colors. In a sense, I want to change the brightness of few points on the plot. Is it possible in IDL? I am using color table 13 and plot and oplot procedure of IDL.

The general idea is to convert your RGB colors to HSL, modify the
lightness or saturation, then convert back to RGB, which is what IDL
requires. It looks like this:

cgLoadCT, 13
cIndex
TVLCT, r, g, b, GET=1
cgDisplay, 800, 400
cgPlot, cgDemoData(17), Color=255B, Layout=[2,1,1]
Color_Convert, r, g, b, hue, light, sat, /RGB_HLS
;light = light*0.5 ; Or whatever amount you need.
sat = sat*0.5 ; Or whatever amount you need.
Color_Convert, hue, light, sat, r, g, b, /HLS_RGB
TVLCT, r, g, b
cIndex
cgPlot, cgDemoData(17), Color=255B, Layout=[2,1,2]
END

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Plotting points in fainter color on an IDL plot [message #87285 is a reply to message #86510] Wed, 22 January 2014 23:27 Go to previous message
Kaushal Sharma is currently offline  Kaushal Sharma
Messages: 12
Registered: August 2013
Junior Member
On Friday, November 15, 2013 4:38:38 PM UTC+5:30, Kaushal Sharma wrote:
> Hello, I have a scatter plot in which there are some points which represent more reliable determinations than others. I want to plot both kinds of points in the same color but the less reliable ones in paler colors. In a sense, I want to change the brightness of few points on the plot. Is it possible in IDL? I am using color table 13 and plot and oplot procedure of IDL.
>
>
>
>
>
> Thanks for the help,
>
> Kaushal

Thank you very much David. Your suggested solution worked for me.

Thank you once again.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Removing (or replacing) substrings in a string array
Next Topic: Bar plotting in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:27:14 PDT 2025

Total time taken to generate the page: 0.00447 seconds