# Thickness\_scaling creates unwanted wide left margin

**URL:** <https://discourse.julialang.org/t/thickness-scaling-creates-unwanted-wide-left-margin/73361>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [December 20, 2021, 9:50am UTC](https://discourse.julialang.org/t/thickness-scaling-creates-unwanted-wide-left-margin/73361 "2021-12-20T09:50:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![parb](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@parb](https://discourse.julialang.org/u/parb)\
**Post date:** [December 20, 2021, 9:50am UTC](https://discourse.julialang.org/t/thickness-scaling-creates-unwanted-wide-left-margin/73361/1 "2021-12-20T09:50:58Z")

</div>

Hi all

When using thickness\_scaling=2, a wide left and bottom margins are added to the plot. These margins cannot be reduced with the margins attribute.

How do I remove the margins created by using thickness\_scaling?

```julia
using Plots
using Plots.PlotMeasures

xs = -π:0.1:π
plot(xs, sin.(xs), thickness_scaling=2, bottom_margin=0px, left_margin=0px)

```

Edit: We can set left\_margin=-45px, but this seems hacky, right?

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

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 20, 2021, 3:49pm UTC](https://discourse.julialang.org/t/thickness-scaling-creates-unwanted-wide-left-margin/73361/2 "2021-12-20T15:49:42Z")

</div>

This behavior seems to be backend-specific. For instance, with pyplot the result has tight margins:

```julia
using Plots; pyplot()
xs = -π:0.1:π
plot(xs, sin.(xs), thickness_scaling=2)

```

![Plots_pyplot_thickness_scaling_plot_margins](https://global.discourse-cdn.com/julialang/original/3X/4/5/458d5c6777e07d38c64664064928fa3f2f2e4482.png)
