# Multiple chart types in Plots.jl

**URL:** <https://discourse.julialang.org/t/multiple-chart-types-in-plots-jl/122904>\
**Category:** Visualization\
**Tags:** plots, plotlyjs\
**Created:** [November 21, 2024, 4:32pm UTC](https://discourse.julialang.org/t/multiple-chart-types-in-plots-jl/122904 "2024-11-21T16:32:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valery](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valery/32/21803_2.png) [@Valery](https://discourse.julialang.org/u/Valery)\
**Post date:** [November 21, 2024, 4:32pm UTC](https://discourse.julialang.org/t/multiple-chart-types-in-plots-jl/122904/1 "2024-11-21T16:32:10Z")

</div>

Is it possible to have multiple chart types in a subplot using Plots.jl ? (the same way one could do it with PlotlyJS) I ideally would like to combine a contourf with a regular line plot (see example below)

Reference: [Multiple chart types in Julia](https://plotly.com/julia/graphing-multiple-chart-types/)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/3/b30d96b3c235b457f6c5a9a9946f3a71b3c8fc5c.png)

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [November 21, 2024, 4:45pm UTC](https://discourse.julialang.org/t/multiple-chart-types-in-plots-jl/122904/2 "2024-11-21T16:45:40Z")

</div>

Sure why not?

```julia
julia> using Plots

julia> contour(rand(100, 100))

julia> plot!(cumsum(rand(100)), color = :black, lw = 3)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/0/a075288dd47e777df421d24f444410c9d27ab45b.jpeg)

---

<div class="post-metadata">

**Author:** ![Valery](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valery/32/21803_2.png) [@Valery](https://discourse.julialang.org/u/Valery)\
**Post date:** [November 21, 2024, 8:25pm UTC](https://discourse.julialang.org/t/multiple-chart-types-in-plots-jl/122904/3 "2024-11-21T20:25:52Z")

</div>

It might sounds obvious if one is used to Plots.jl, but PlotlyJS.jl use another principle where it plots a vector of plots where each plot can have a different chart type. I have not seen something similar with Plots.jl.
