# Help changing the visualization of my figures

**URL:** https://discourse.julialang.org/t/help-changing-the-visualization-of-my-figures/22994
**Category:** Visualization
**Created:** [April 10, 2019, 12:25pm UTC](https://discourse.julialang.org/t/help-changing-the-visualization-of-my-figures/22994 "2019-04-10T12:25:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)
#### Post date: [April 10, 2019, 12:25pm UTC](https://discourse.julialang.org/t/help-changing-the-visualization-of-my-figures/22994/1 "2019-04-10T12:25:03Z")

</div>

Hello, i’m ploting these two figures:

![fluxo_harm_multipla3](https://global.discourse-cdn.com/julialang/original/3X/9/7/975d0eeea0b32bb53b663c7b23388d0c1253fea5.png) ![fluxo_harm_naomultipla3](https://global.discourse-cdn.com/julialang/original/3X/a/9/a9b4770f5ed19a42b1adae77e85f41aba5c7899c.png)

Using this code:

```julia
using StatPlots

Nt = 33;

DHTvI = [0.948922; 1.84699; 2.33009; 2.82551; 3.35778; 4.14989; 4.70336; 5.57; 6.16913; 6.5514; 6.5514; 2.27957; 2.88751; 3.20105; 3.20105; 3.38961; 3.42008; 3.45269; 3.46789; 3.48355; 3.50024; 3.51735; 3.53834; 3.55256; 3.56152; 3.56152; 4.15358; 4.15728; 4.16099; 6.16913; 6.16913; 6.16913; 6.16913];

DHTvI_filtro = [0.916418; 1.78372; 2.22713; 2.68392; 3.17623; 3.9166; 4.43431; 5.24547; 5.82063; 6.18936; 6.18784; 2.21456; 2.82132; 3.13448; 3.13448; 3.20636; 3.2352; 3.2661; 3.28053; 3.29539; 3.31124; 3.32749; 3.34743; 3.36094; 3.36946; 3.36946; 3.92007; 3.92355; 3.92704; 5.82062; 5.82062; 5.82062; 5.82062];

DHTv3 = [0.906961; 1.76531; 2.27702; 2.7787; 3.30602; 4.21055; 4.83374; 5.79876; 6.46096; 6.88203; 6.88203; 2.21223; 2.85706; 3.19324; 3.19324; 3.32349; 3.34032; 3.35847; 3.36702; 3.37584; 3.38529; 3.39499; 3.40694; 3.41507; 3.4202; 3.4202; 4.21269; 4.21482; 4.21697; 6.46096; 6.46096; 6.46096; 6.46096];

DHTv3_filtro = [0.755687; 1.47087; 1.80179; 2.14541; 2.51801; 3.12647; 3.54846; 4.2059; 4.66503; 4.95754; 4.86841; 1.92674; 2.58204; 2.9223; 2.9223; 2.53762; 2.55653; 2.5769; 2.58651; 2.59643; 2.60704; 2.61796; 2.63139; 2.64051; 2.64628; 2.64628; 3.12891; 3.13135; 3.13381; 4.66503; 4.66503; 4.66503; 4.66503];

    barras = repeat(["Antes","Depois"], inner = Nt)
    p1 = groupedbar([DHTv3 DHTv3_filtro], group = barras, xlabel = "Barra", ylabel = "DTT3 (%)", bar_position = :dodge, bar_width=0.7)
    plot(p1)
    savefig("fluxo_harm_multipla3")
    p2 = groupedbar([DHTvI DHTvI_filtro], group = barras, xlabel = "Barra", ylabel = "DTTI (%)", bar_position = :dodge, bar_width=0.7)
    plot(p2)
    savefig("fluxo_harm_naomultipla3")

```

I have two questions:

1. How can i change the y-axis of the first figure to be equal the second one? i.e, showing 0,1,2,3,4,5 and 6, instead of 0,2,4 and 6;

2. How can i move the “repeat” box showing the names “Antes” and “Depois” to the mid of my figures? Because as you can see, they are in the top right corner, above some of the bars i’m plotting.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)
#### Post date: [April 10, 2019, 3:19pm UTC](https://discourse.julialang.org/t/help-changing-the-visualization-of-my-figures/22994/2 "2019-04-10T15:19:35Z")

</div>

1. You can use `yticks!`
2. Specify the position with `legend`

Open [Overview · Plots](http://docs.juliaplots.org/latest/attributes/) then `Ctrl+F` to search for keywords and try it out. 😆

---

<div class="post-metadata">

### Author: ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)
#### Post date: [April 10, 2019, 3:33pm UTC](https://discourse.julialang.org/t/help-changing-the-visualization-of-my-figures/22994/3 "2019-04-10T15:33:29Z")

</div>

Ok, thanks for the info! I’m going to try those!
