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

Home » Public Forums » archive » Plotting symbol : Open / filled (closed) circle with a dot at the center
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 symbol : Open / filled (closed) circle with a dot at the center [message #87286] Wed, 22 January 2014 23:34 Go to next message
Kaushal Sharma is currently offline  Kaushal Sharma
Messages: 12
Registered: August 2013
Junior Member
Hello,

I need to define a new plotting symbol as a circle but with a dot inside (sun symbol for plotting not for labelling). There are routines through which open or filled circle can be used as a plotting symbol. But I did not find any which has a dot inside. Currently I am using an alternative approach:

plot,findgen(20),psym=sym(6)
oplot,findgen(20),psym=3

This serves the purpose but since there are many plot commands in my routine and for each of them I have to supply oplot command. I want to avoid writing oplot after each plot command.

It would be helpful if any of you could suggest some better way to do this.


Kaushal
Re: Plotting symbol : Open / filled (closed) circle with a dot at the center [message #87288 is a reply to message #87286] Thu, 23 January 2014 01:42 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 23.01.2014 08:34, Kaushal Sharma wrote:
> It would be helpful if any of you could suggest some better way to do this.

My suggestion would be to write your own plot procedure, like this:

pro Kaushal_sunplot, data, keywords
; your code
plot, data, psym=sym(6), keywords
oplot, data, psym=3, keywords
end

then you will have to type it only once each time.
Re: Plotting symbol : Open / filled (closed) circle with a dot at the center [message #87289 is a reply to message #87286] Thu, 23 January 2014 02:13 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, January 23, 2014 8:34:08 AM UTC+1, Kaushal Sharma wrote:
> Hello,
>
>
>
> I need to define a new plotting symbol as a circle but with a dot inside (sun symbol for plotting not for labelling). There are routines through which open or filled circle can be used as a plotting symbol. But I did not find any which has a dot inside. Currently I am using an alternative approach:
>
>
>
> plot,findgen(20),psym=sym(6)
>
> oplot,findgen(20),psym=3
>
>
>
> This serves the purpose but since there are many plot commands in my routine and for each of them I have to supply oplot command. I want to avoid writing oplot after each plot command.
>
>
>
> It would be helpful if any of you could suggest some better way to do this.
>
>
>
>
>
> Kaushal

I think Fabien's suggestion is a good one.
One thing you can look at is the the UserSym procedure (http://www.exelisvis.com/docs/USERSYM_Procedure.html).
However, it seems like the only one line is allowed. That means that you cannot disconnect the outer circle from the dot in the middle. In the example, it is shown how to produce a filled circle.

Regards,
Helder
Re: Plotting symbol : Open / filled (closed) circle with a dot at the center [message #87317 is a reply to message #87288] Thu, 23 January 2014 23:07 Go to previous messageGo to next message
Kaushal Sharma is currently offline  Kaushal Sharma
Messages: 12
Registered: August 2013
Junior Member
On Thursday, January 23, 2014 3:12:47 PM UTC+5:30, Fabien wrote:
> On 23.01.2014 08:34, Kaushal Sharma wrote:
>
>> It would be helpful if any of you could suggest some better way to do this.
>
>
>
> My suggestion would be to write your own plot procedure, like this:
>
>
>
> pro Kaushal_sunplot, data, keywords
>
> ; your code
>
> plot, data, psym=sym(6), keywords
>
> oplot, data, psym=3, keywords
>
> end
>
>
>
> then you will have to type it only once each time.

Hmmm... If there is no other method to do that, the one you suggested would be the best (I guess).


Thanks
Re: Plotting symbol : Open / filled (closed) circle with a dot at the center [message #87318 is a reply to message #87289] Thu, 23 January 2014 23:12 Go to previous message
Kaushal Sharma is currently offline  Kaushal Sharma
Messages: 12
Registered: August 2013
Junior Member
On Thursday, January 23, 2014 3:43:35 PM UTC+5:30, Helder wrote:
> On Thursday, January 23, 2014 8:34:08 AM UTC+1, Kaushal Sharma wrote:
>
>> Hello,
>
>>
>
>>
>
>>
>
>> I need to define a new plotting symbol as a circle but with a dot inside (sun symbol for plotting not for labelling). There are routines through which open or filled circle can be used as a plotting symbol. But I did not find any which has a dot inside. Currently I am using an alternative approach:
>
>>
>
>>
>
>>
>
>> plot,findgen(20),psym=sym(6)
>
>>
>
>> oplot,findgen(20),psym=3
>
>>
>
>>
>
>>
>
>> This serves the purpose but since there are many plot commands in my routine and for each of them I have to supply oplot command. I want to avoid writing oplot after each plot command.
>
>>
>
>>
>
>>
>
>> It would be helpful if any of you could suggest some better way to do this.
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> Kaushal
>
>
>
> I think Fabien's suggestion is a good one.
>
> One thing you can look at is the the UserSym procedure (http://www.exelisvis.com/docs/USERSYM_Procedure.html).
>
> However, it seems like the only one line is allowed. That means that you cannot disconnect the outer circle from the dot in the middle. In the example, it is shown how to produce a filled circle.
>
>
>
> Regards,
>
> Helder

Helder, I am able to get a circle and then a dot inside but the problem is that this dot is connected from the circle by a line (as pointed out by you, a line showing up like a radius). So I think I will have to go with Fabien's method that is writing a separate procedure and calling it in the plotting procedure.

Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plus Minus in t=TEXT()
Next Topic: TODO tag in IDL Workbench?

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

Current Time: Wed Oct 08 11:37:48 PDT 2025

Total time taken to generate the page: 0.00564 seconds