[ncl-talk] Scatter plot with density

Dennis Shea shea at ucar.edu
Tue Mar 21 11:31:46 MDT 2017


The attached is done with random numbers.
It illustrates the process.

x, y, values are all one-dimensional arrays

%> ncl tst_density_scatter.ncl_v0

It will draw to an x11 windo.

HTH

On Tue, Mar 21, 2017 at 1:56 AM, Ipsita Putatunda <
ipsita.putatunda at gmail.com> wrote:

> Dear Dennis,
> Thank you for your suggestions, but I have little doubt;
>
>  res at sfXArray       = x_location_of-each_point  ; [*]
>   res at sfYArray       = y_location_of-each_point  ; [*]
>
> these two resources(res at sfXArray, res at sfYArray) should be monotonically
> increasing or decreasing, where in my case it is not.
> What is "data" here in plotting the scatter_contour?  is it a 2D array of
> X and Y values (my X and Y is not any gridded data, it is unstructured
> arbitrary data, with almost 40000 data points)?
>
> Regards,
> Ipsita
>
> On Tue, Mar 21, 2017 at 9:41 AM, Ipsita Putatunda <
> ipsita.putatunda at gmail.com> wrote:
>
>> Dear Dennis,
>> Thank you for your suggestions, but I have little doubt;
>>
>>  res at sfXArray       = x_location_of-each_point  ; [*]
>>   res at sfYArray       = y_location_of-each_point  ; [*]
>>
>> these two resources(res at sfXArray, res at sfYArray) should be monotonically
>> increasing or decreasing, where in my case it is not.
>> What is "data" here in plotting the scatter_contour?  is it a 2D array of
>> X and Y values (my X and Y is not any gridded data, it is unstructured
>> arbitrary data, with almost 40000 data points)?
>>
>> Regards,
>> Ipsita
>>
>> On Tue, Mar 21, 2017 at 12:58 AM, Dennis Shea <shea at ucar.edu> wrote:
>>
>>> Hello , I am out for the afternoon. Please, always respond to ncl-talk.
>>> Could u pls resend.
>>>
>>> Sent from my iPhone
>>>
>>> On Mar 20, 2017, at 11:39 AM, Ipsita Putatunda <
>>> ipsita.putatunda at gmail.com> wrote:
>>>
>>> Dear Dennis,
>>> Thank you for your suggestions, but I have little doubt;
>>>
>>>  res at sfXArray       = x_location_of-each_point  ; [*]
>>>   res at sfYArray       = y_location_of-each_point  ; [*]
>>>
>>> these two resources(res at sfXArray, res at sfYArray) should be monotonically
>>> increasing or decreasing, where in my case it is not.
>>> What is "data" here in plotting the scatter_contour?  is it a 2D array
>>> of X and Y values (my X and Y is not any gridded data, it is unstructured
>>> arbitrary data, with almost 40000 data points)?
>>>
>>> Regards,
>>> Ipsita
>>>
>>>
>>>
>>> On Mon, Mar 20, 2017 at 7:20 PM, Dennis Shea <shea at ucar.edu> wrote:
>>>
>>>> Yes.
>>>>
>>>>   res at gsnDraw        = False        ; Don't draw plots
>>>>   res at gsnFrame        = False        ; Don't advance frame
>>>>
>>>> [1] Scatter plot your values
>>>>         scatter =
>>>>
>>>> [2] Overlay a contour. Something like
>>>>      res at trGridType    = "TriangularMesh"
>>>>      res at sfXArray       = x_location_of-each_point  ; [*]
>>>>      res at sfYArray       = y_location_of-each_point  ; [*]
>>>>
>>>>
>>>>   res at cnLevelSelectionMode        = "ManualLevels"
>>>>   res at cnMinLevelValF              =
>>>>   res at cnMaxLevelValF              =
>>>>   res at cnLevelSpacingF             =
>>>>
>>>>   res at cnFillOn                    = True
>>>> ; see: http://www.ncl.ucar.edu/Document/Graphics/color_table_galler
>>>> y.shtml
>>>> ;;res at cnFillPalette               = "..."  ; if not specified use
>>>> default color map
>>>>
>>>>   res at cnLinesOn                   = True or False
>>>>   res at cnLineLabelsOn              = True or False
>>>>
>>>>    contour_scatter = gsn_csm_contour(wks,data,res)
>>>>
>>>>   overlay(scatter,contour_scatter)
>>>>
>>>>
>>>>
>>>> On Mon, Mar 20, 2017 at 6:11 AM, Ipsita Putatunda <
>>>> ipsita.putatunda at gmail.com> wrote:
>>>>
>>>>> Dear all,
>>>>>
>>>>> I have one dimensional datasets for X and Y coordinate. Am making
>>>>> scatter plot with these data, but what I want if there is any way in NCL to
>>>>> generate density scatter plot.
>>>>> Thanks in advance for any help in this issue.
>>>>>
>>>>> Regards,
>>>>> Ipsita
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170321/8f3a5321/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst_density_scatter.ncl_v0
Type: application/octet-stream
Size: 1629 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170321/8f3a5321/attachment.obj 


More information about the ncl-talk mailing list