[CentralOH] Python Graph Help

Shareef Dabdoub shareef at dabdoub.net
Fri Mar 2 16:05:13 EST 2018


I put this together with matplotlib. It's exactly what you described,
although placement of things is a bit fiddly. But you could wrap this in
some sort of class or function to parameterize it.

---------------
from matplotlib import pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)

ax.set_frame_on(False)
ax.xaxis.set_visible(False)
ax.set_ylim((93,104))
ax.set_yticks(range(93,104,2), minor=True)

ax.axvline(linewidth=20, color="r", ymin=0, ymax=0.5)
ax.axvline(linewidth=20, color="orange", ymin=0.5, ymax=0.675)
ax.axvline(linewidth=20, color="r", ymin=0.675, ymax=1)

t1 = plt.Polygon([(0.03,99), (0.15,100), (0.15,98)], color="g")
plt.gca().add_patch(t1)
ax.text(0.06, 98.8, "99$^o$F", fontsize=12, color="w")

plt.show()
--------




On Fri, Mar 2, 2018 at 11:22 AM, mrehner <mrehner at e-wrench.net> wrote:

> https://datavizcatalogue.com/
>
>
>
> Cheers,
>
>
>
> Mike
>
>
>
> *From:* CentralOH [mailto:centraloh-bounces+mrehner=e-wrench.net at python.
> org] *On Behalf Of *Eric Floehr
> *Sent:* Thursday, March 1, 2018 5:45 PM
> *To:* Central Ohio Python Users Group
> *Subject:* [CentralOH] Python Graph Help
>
>
>
> All,
>
>
>
> I'm trying to determine which python graphing library would be able to
> make the following graph type. I don't have a name for it, but here is the
> description...
>
>
>
> It's basically a vertical or horizontal line on some scale, with shaded
> rectangles over parts of it indicating certain things, and a triangle with
> a specific number pointing to that spot on the line.
>
>
>
> The closest example is the original Star Trek sick bay charts, and I found
> an example here:
>
>
>
> https://blogs.sas.com/content/sastraining/files/2017/06/
> startrek_med_dashboard_tips.gif
>
>
>
> Any thoughts?
>
>
> Thanks so much!
>
> Eric
>
>
>
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> https://mail.python.org/mailman/listinfo/centraloh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20180302/58b28366/attachment-0001.html>


More information about the CentralOH mailing list