# Plotting data showing 2 sets of data

**URL:** <https://discourse.julialang.org/t/plotting-data-showing-2-sets-of-data/107272>\
**Category:** New to Julia\
**Tags:** syntax, pluto\
**Created:** [December 7, 2023, 2:07pm UTC](https://discourse.julialang.org/t/plotting-data-showing-2-sets-of-data/107272 "2023-12-07T14:07:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kearney](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@Kearney](https://discourse.julialang.org/u/Kearney)\
**Post date:** [December 7, 2023, 2:07pm UTC](https://discourse.julialang.org/t/plotting-data-showing-2-sets-of-data/107272/1 "2023-12-07T14:07:59Z")

</div>

this is my code

‘’'begin  
2 wind = CSV.File(WindGenFile) |\> DataFrame

3 rename!(wind, :" REGION" =\> :Region, :“DATE & TIME” =\> :DateTime, :" ACTUAL WIND(MW)" =\> :ActualWind, :" FORECAST REGION(MW)" =\> :ForecastWind)  
5  
6 windVectors = map([wind]) do df  
7 select!(df, Not([Region]))  
8 map([:ForecastWind, :ActualWind]) do data  
9 df[!,data] = map(df[!,data]) do d  
10 d == “-” ? missing : typeof(d) == Int ? d : parse(Int,d)  
11 end  
12 end  
end

windDates = wind[:,:DateTime] ;  
16 windDates = [(s[1:end-6]) for s in windDates]  
17 windDates = [replace (s, “January” =\> “1”, “February” =\> 2, “March” =\> 3,“April”  
=\> 4, “May”=\> 5, “June” =\> 6, “July” =\> 7, “August”’ =\> 8, “September” =\> 9,  
“October” =\> 10, “November =\> 11”, “December” =\> 12) for s in windDates]  
18 WindDateFormat = Dates.DateFormat(“dd mm yyyy”)  
19 windDates = [Dates.Date(s, WindDateFormat) for s in windDates]  
20 StringwindDates = string.(windDates);  
21  
22 Monday1 = findfirst(x → x == “2023-10-30”, StringwindDates)  
23 Monday2 = findfirst(x → x == “2023-11-06”, StringwindDates)  
24 Monday3 = findfirst(x → x == “2023-11-13”, StringwindDates)  
25 Monday4 = findfirst(x → x == “2023-11-20”, StringwindDates)  
26 Monday5 = findfirst(x → x == “2023-11-27”, StringwindDates)  
27 Index0fMondays = [Monday1, Monday2, Monday3, Monday4, Monday5]  
28 Dates0fMondays = [StringwindDates[i] for i = [Index0fMondays]]  
29 Dates0fMondays = DatesOfMondays [1]  
30  
31 windForecast = windVectors [1][1]  
32 windActual = windVectors [1][2]  
33 Forecast = windForecast  
34 Actual = windActual  
35  
36 range = 1:length(windForecast)  
end’‘’  
I am getting a syntax error and I don’t know what it is. Before this code I have 2 other cell blocks, the first one is ‘’‘using CSV, DataFrames, CairoMakie, Dates’‘’ and the second one is WindGenFile and then the file location.

---

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [December 7, 2023, 2:33pm UTC](https://discourse.julialang.org/t/plotting-data-showing-2-sets-of-data/107272/2 "2023-12-07T14:33:57Z")

</div>

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

Start by putting each line (or code block) in its own Pluto cell to see which line is giving the syntax error.

Also, you have made the common mistake of using `'''` rather than ````` when posting your code. That is why is does not look right in the post.

```julia-auto
Code should look like this in a separate box.

```

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…
