I am visualizing trade flows in QGIS. I am trying to make the line width of approximately 100 polylines be proportional to the associated value listed for each in the attribute table. Several posts show how to classify them into groups using Natural Jenks through the Layer Properties>>Style>>Graduated field. This is not what I'm looking for. I would like a code where I can say for example line width=value of attribute field. I may also want to do (value of attribute field)/100 or log(value of attribute field) so the scale of the line width is appropriate for the map.

I tried selecting Style>>Single Symbol>>Pen Width>>Variable>>Value as well but that did not do anything. enter image description here

  • 2
    The attribute value selection is just one entry above in the menu that you show in the screenshot.
    – underdark
    Jun 11, 2016 at 20:45
  • @underdark I tried that as well. However, my whole screen turns green afterwards. I amended by question to show what happens.
    – Danny
    Jun 12, 2016 at 23:04
  • I just realized that I neglected to adjust the "Values" field to a scale that was more appropriate for the map. My screen was turning green because some of the values were above 1000 which would result in a line that is over 1000mm wide.
    – Danny
    Jun 12, 2016 at 23:12

1 Answer 1


In your 'image' click to Edit, then open the option 'Fields and values' and refer to the attribute name containing the pen widths.

Linewidth attribute applied on Natural Earth's river dataset

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.