# help for newbie

**URL:** <https://community.plotly.com/t/help-for-newbie/47886>\
**Category:** Dash Julia\
**Created:** [December 4, 2020, 9:51pm UTC](https://community.plotly.com/t/help-for-newbie/47886 "2020-12-04T21:51:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilio\_alvizo](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@emilio\_alvizo](https://community.plotly.com/u/emilio_alvizo)\
**Post date:** [December 4, 2020, 9:51pm UTC](https://community.plotly.com/t/help-for-newbie/47886/1 "2020-12-04T21:51:04Z")

</div>

help i’m new to this and i don’t know how i could graph a ternary contour in julia, does anyone know how i could do it?

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jack/32/11_2.png) [@jack](https://community.plotly.com/u/jack)\
**Post date:** [January 31, 2021, 5:21pm UTC](https://community.plotly.com/t/help-for-newbie/47886/2 "2021-01-31T17:21:47Z")

</div>

Ternary contour plot syntax in Julia is almost the same as ternary plot syntax in Python. You can likely figure it out from these docs:

> **[Ternary contours](https://plotly.com/python/ternary-contour/)**
>
> How to make Ternary Contour Plots in Python with plotly

After you have the plot working, please see this chapter for adding Julia plots to your Julia Dash app:

[https://dash-julia.plotly.com/interactive-graphing](https://dash-julia.plotly.com/interactive-graphing)

Sorry for the long delay in response here. In the future, you’ll likely get a faster reply if posting at [https://discourse.julialang.org](https://discourse.julialang.org)

---

<div class="post-metadata">

**Author:** ![emilio\_alvizo](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@emilio\_alvizo](https://community.plotly.com/u/emilio_alvizo)\
**Post date:** [January 31, 2021, 5:53pm UTC](https://community.plotly.com/t/help-for-newbie/47886/3 "2021-01-31T17:53:53Z")

</div>

I’ve already seen that documentation but I can’t find the ternary plot for julia

---

<div class="post-metadata">

**Author:** ![empet](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@empet](https://community.plotly.com/u/empet)\
**Post date:** [February 1, 2021, 8:29pm UTC](https://community.plotly.com/t/help-for-newbie/47886/4 "2021-02-01T20:29:40Z")

</div>

Hi @emilio_alvizo,  
With PlotlyJS.jl you can plot only scatterternary. Here is the list of available traces: [https://github.com/sglyon/PlotlyBase.jl/blob/2494101ba3f8ff9be9063db5fd69df1ae696c605/src/api.jl#L19](https://github.com/sglyon/PlotlyBase.jl/blob/2494101ba3f8ff9be9063db5fd69df1ae696c605/src/api.jl#L19).

Scatternary plot is intended for plotting data representing values of three variables A, B, C with cosnstant sum:  
A+B+C=constant (usually 1 or 100).

Here is an example:

```auto
using PlotlyJS
#include style file: https://gist.github.com/empet/6b4f441ed96d724d67ff77f1fb8b0a79
include("plotlyju.jl")
mydata=[64 27 9;
 81 10 9;
 66 15 19;
 2 40 58;
 18 23 59;
 95 1 4;
 44 22 34;
 51 38 11;
 64 32 4;
 56 5 39;
 25 71 4;
 75 11 14;
 73 21 6;
 97 3 0;
 85 6 9]
#Check the sum on rows
s=sum(mydata, dims=(2))
#print(s)
trace = scatterternary(a=mydata[:,1],
                       b=mydata[:, 2],
                       c=mydata[:, 3],
                       mode="markers",
                       marker_size=14,
                       marker_color="blue",
                       marker_symbol="triangle-down"
                       )
layout =Layout(width=500, height=500, margin_t=150, title_text="Scatterternary Plot",
               ternary=attr(sum=100, 
                            aaxis_title='A', 
                            baxis_title='B', 
                            caxis_title='C'))
fig = plot(trace, layout, style=plotlyju)
display(fig)

```

![scatterternary](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/9/914f0b1b9c97d38f282215e76ba545f6e1174674.png)  
or another version:

```auto
fig = Plot(style=plotlyju)
fig.data=[scatterternary(a=mydata[:,1],
                         b=mydata[:, 2],
                         c=mydata[:, 3],
                         mode="markers",
                         marker_size=12,
                         marker_color="red" #here is used the default marker_symbol="circle"
                       )];
fig.layout = Layout(width=500, height=500, title_text="Scatterternary Plot",
                    ternary=attr(sum=100, 
                                 aaxis_title='A', 
                                 baxis_title='B', 
                                 caxis_title='C'))
plot(fig)

```

To save your figure as png, jpg, svg, or pdf plot, use `savefig`:

```auto
savefig(fig, "scatterternary.png", width=500, height=500, scale=1)

```

---

<div class="post-metadata">

**Author:** ![emilio\_alvizo](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@emilio\_alvizo](https://community.plotly.com/u/emilio_alvizo)\
**Post date:** [March 1, 2021, 11:18pm UTC](https://community.plotly.com/t/help-for-newbie/47886/5 "2021-03-01T23:18:51Z")

</div>

It is a pity that contours cannot be plotted, how unfortunate
