# strokeWeight(1) draws 2 pixel width

**URL:** <https://discourse.processing.org/t/strokeweight-1-draws-2-pixel-width/23425>\
**Category:** p5.js\
**Created:** [August 22, 2020, 11:05am UTC](https://discourse.processing.org/t/strokeweight-1-draws-2-pixel-width/23425 "2020-08-22T11:05:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [August 22, 2020, 12:45pm UTC](https://discourse.processing.org/t/strokeweight-1-draws-2-pixel-width/23425/2 "2020-08-22T12:45:36Z")

</div>

Hello,

My exploration of this with with Google Chrome.

My test code:

```auto
function setup() 
  {
  print(pixelDensity());
    
  createCanvas(720, 400);
  background(0);
  //noSmooth();

  translate(50, 0);
  stroke(255);
  
  for (let i=0; i<21; i++)
    {  
    strokeWeight(i);
    line(30*i, height-50, 30*i, 50);
    point(30*i, 25);
    }
  }

```

Reference:  
[https://p5js.org/reference/#/p5/strokeWeight](https://p5js.org/reference/#/p5/strokeWeight)

StrokeWidth() 0 to 20 for points and lines (expand the image for detail):

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/773f495b9d0106d209800f34a6bd07f487721cd0.png)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/strokeweight-1-draws-2-pixel-width/23425)._
