Jump to content

File:Humidex plot.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 900 × 810 pixels, file size: 102 KB)

Summary

Description
English: Plot of humidex values depending on temperature and relative humidity
Date
Source Own work
Author Morn
Other versions
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

Source code
#!/usr/bin/env python

# Plot Humidex graph with Matplotlib

from pylab import *

figure(figsize = (10, 9))
tt = range(20, 51)

def humidex(t, r):
    "Calculate Humidex value for T (°C) and RH (%)"

    # https://wiki.riteme.site/wiki/Dew_point
    b = 17.67
    c = 243.5
    gamma = log(r / 100) + (b * t) / (c + t)
    t_dew = c * gamma / (b - gamma)

    # https://wiki.riteme.site/wiki/Humidex
    hh = 5417.753 * (1 / 273.16 - 1 / (273.15 + t_dew))
    h = t + .5555 * (6.11 * exp(hh) - 10)
    return round(h)

for r in range(100, 0, -10):
    plot(tt, [humidex(t, r) for t in tt], label = "RH = %u%%" % r,
        lw = 1.5, ls = "dashed", marker = "o")

legend()
fill_between(tt, 19.5, 29.5, color = "#0f0", alpha = .3)
fill_between(tt, 29.5, 39.5, color = "#ff0", alpha = .3)
fill_between(tt, 39.5, 45.5, color = "#f80", alpha = .3)
fill_between(tt, 45.5, 200,  color = "#f00", alpha = .3)

xticks(range(100))
yticks(range(150))
axis([25, 45, 25, 60])
xlabel("T [°C]")
ylabel("Humidex")
title("Humidex based on temperature and relative humidity")
grid()
savefig("humidex_plot.svg")

show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

22 July 2022

104,615 byte

810 pixel

900 pixel

image/svg+xml

7a7efd26ff8a21ea3f84dac4630c3652052fc703

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current14:06, 22 July 2022Thumbnail for version as of 14:06, 22 July 2022900 × 810 (102 KB)MornUploaded own work with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata