Using Manipulate for ploting

Hello Everyone, I am trying to use interactive plotting using manipulate function (Pkg-Ineract) on Juno-Atom. I am unable to plot x-axis in dynamic plot using @manipulate function. I am pasting my static plot and dynamic plot code and it’s Gif-(I can’t paste static plot picture in this post as I am new user so I am not allowed to attach more than one item). In short, I want the same X-axis in the dynamic plot as in static plot. When I try plotting X-axis in dynamic part I get blank output.

Static code

plot(US_data_T_confirmed[8:end],US_data_new_cases, m=:o )
ylabel!("New Confirmed Cases in Past Seven Days")
xlabel!("Total Confirmes Cases")
title!("COVID-19 cases in US")

Dynamic code

using Plots 
using Interact
@manipulate for Days in 1:length(dates)
     plot(US_data_new_cases[1:Days],m=:o)
     xlims!(1,length(dates))
     ylabel!("New Confirmed Cases in Past Seven Days")
     title!("COVID-19 cases")
end

This should work:

using Plots 
using Interact
@manipulate for Days in 1:length(dates)
     p = plot(US_data_new_cases[1:Days],m=:o)
     xlims!(1,length(dates))
     ylabel!("New Confirmed Cases in Past Seven Days")
     title!("COVID-19 cases")
     display(p)
end

Sorry, it did not work! I just got the slider as output! I need to use variable US_data_T_confirmed[8:end] on the x-axis. I don’t see; you used this variable in your code.

I found my problem: I was inputing a column vector for x-axis. Inputing row vector using transpose gave me expected output. Following code worked:

T_US=transpose(US_data_T_confirmed[8:end])
using Plots 
using Interact
@manipulate for Days in 1:length(dates)
     plot(T_US[1:Days],US_data_new_cases[1:Days],m=:o)
     xlims!(T_US[1],T_US[end])
     ylabel!("New Confirmed Cases in Past Seven Days")
     title!("COVID-19 cases")
end