how to overplot a vertical line in the existing plot made using plot function? [message #94055] |
Tue, 10 January 2017 05:42  |
ann[1]
Messages: 9 Registered: December 2012
|
Junior Member |
|
|
Hi,
I used plot function to create a plot. Now I want to over-plot a vertical line onto that. Can anyone tell me, how to do it?
Following is the command I used:
pp = plot(time_sec,nic_pil,xtitle='Time [sec]',ytitle='I!Dc!N/I!Dc,QS!N',dimensions=[900,800], $
yrange= [min(nic_pil)-0.01,max(nic_pil)+0.01],axis_style=1, $
MARGIN = [0.08, 0.25, 0.15, 0.15],xrange=[0.0,max(time_sec)+6])
I want to plot the line at a particular value of time_sec.
Looking forward to your suggestions:-)
Many thanks,
Anjali
|
|
|
Re: how to overplot a vertical line in the existing plot made using plot function? [message #94056 is a reply to message #94055] |
Tue, 10 January 2017 06:03   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Tuesday, January 10, 2017 at 2:42:45 PM UTC+1, Anjali wrote:
> Hi,
>
> I used plot function to create a plot. Now I want to over-plot a vertical line onto that. Can anyone tell me, how to do it?
>
> Following is the command I used:
> pp = plot(time_sec,nic_pil,xtitle='Time [sec]',ytitle='I!Dc!N/I!Dc,QS!N',dimensions=[900,800], $
> yrange= [min(nic_pil)-0.01,max(nic_pil)+0.01],axis_style=1, $
> MARGIN = [0.08, 0.25, 0.15, 0.15],xrange=[0.0,max(time_sec)+6])
>
> I want to plot the line at a particular value of time_sec.
>
> Looking forward to your suggestions:-)
>
> Many thanks,
> Anjali
hi,
try:
pl = polyline([particular_time_sec,particular_time_sec],pp.yrange ,/data,target=pp)
obviously you have to define where you want the line:
particular_time_sec = ???
Cheers,
Helder
|
|
|
Re: how to overplot a vertical line in the existing plot made using plot function? [message #94057 is a reply to message #94056] |
Tue, 10 January 2017 06:10  |
ann[1]
Messages: 9 Registered: December 2012
|
Junior Member |
|
|
On Tuesday, 10 January 2017 15:03:47 UTC+1, Helder wrote:
> On Tuesday, January 10, 2017 at 2:42:45 PM UTC+1, Anjali wrote:
>> Hi,
>>
>> I used plot function to create a plot. Now I want to over-plot a vertical line onto that. Can anyone tell me, how to do it?
>>
>> Following is the command I used:
>> pp = plot(time_sec,nic_pil,xtitle='Time [sec]',ytitle='I!Dc!N/I!Dc,QS!N',dimensions=[900,800], $
>> yrange= [min(nic_pil)-0.01,max(nic_pil)+0.01],axis_style=1, $
>> MARGIN = [0.08, 0.25, 0.15, 0.15],xrange=[0.0,max(time_sec)+6])
>>
>> I want to plot the line at a particular value of time_sec.
>>
>> Looking forward to your suggestions:-)
>>
>> Many thanks,
>> Anjali
>
> hi,
> try:
>
> pl = polyline([particular_time_sec,particular_time_sec],pp.yrange ,/data,target=pp)
>
> obviously you have to define where you want the line:
> particular_time_sec = ???
>
> Cheers,
> Helder
Hi Helder,
It worked.
Thank you very much :-)
Cheers,
Anjali
|
|
|