# VegaLite: tex support + edit legend

**URL:** <https://discourse.julialang.org/t/vegalite-tex-support-edit-legend/66046>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [August 8, 2021, 9:44pm UTC](https://discourse.julialang.org/t/vegalite-tex-support-edit-legend/66046 "2021-08-08T21:44:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jo-fleck](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jo-fleck](https://discourse.julialang.org/u/jo-fleck)\
**Post date:** [August 8, 2021, 9:44pm UTC](https://discourse.julialang.org/t/vegalite-tex-support-edit-legend/66046/1 "2021-08-08T21:44:17Z")

</div>

Thanks to everyone who is contributing to VegaLite.jl! It’s a fantastic addition to Julia’s plotting ecosystem.

Using the examples in the documentation, I was able to generate the plot below.

I have two questions related to its legend:

1. Does VegaLite currently support latex? I would like to print the greek version of alpha.

2. How can I edit the legend? For example, how can I remove its title (assuming I cannot tex it)? I found a close example [here](https://www.queryverse.org/VegaLite.jl/stable/examples/examples_maps/#London-Tube-Lines-1) and instructions [here](https://vega.github.io/vega-lite/docs/legend.html#title) but I am not able to port them into my code (see below).

![plot_states](https://global.discourse-cdn.com/julialang/original/3X/e/9/e91fba81c16a2935f487c2ff5c797bb339d4eff7.png)

```julia
using VegaLite, VegaDatasets, DataFrames

us10m = dataset("us-10m")
df_income = DataFrame(dataset("income"))

# How to include my data
df_my_data = deepcopy(df_income);
filter!(row -> row.group .== "<10000", df_my_data);
filter!(row -> row.name .!= "Puerto Rico", df_my_data);
select!(df_my_data, [:name, :id, :pct]);
rename!(df_my_data, :pct => :alpha);

p_states = @vlplot(
    title="A nice plot",
    width=500, height=300,
    :geoshape,
    data=df_my_data,
    transform=[{
        lookup=:id,
        from={
            data={
                values=us10m,
                format={
                    type=:topojson,
                    feature=:states
                }
            },
            key=:id
        },
        as=:geo
    }],
    projection={type=:albersUsa},
    encoding={
        shape={field=:geo,type=:geojson},
        color={field=:alpha,type=:quantitative},
    }
)

```

---

<div class="post-metadata">

**Author:** ![jo-fleck](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jo-fleck](https://discourse.julialang.org/u/jo-fleck)\
**Post date:** [August 9, 2021, 6:47pm UTC](https://discourse.julialang.org/t/vegalite-tex-support-edit-legend/66046/2 "2021-08-09T18:47:19Z")

</div>

Here are my temporary answers/solutions - looking forward to better ones.

1. VegaLite does not support latex but you can use unicode as a work-around.
2. The legend can be formatted by adding a specific entry after the `color` command.

See below how I managed to replace the alpha. If you want no legend title, use `title=nothing`.

```julia
    encoding={
        shape={field=:geo,type=:geojson},
        color={field=:chi_s,type=:quantitative,legend={title="α"}},
    }

```
