[CentralOH] Python Graph Help

mrehner mrehner at e-wrench.net
Wed Mar 7 00:04:40 EST 2018


Eric,

Your question intrigued me and I worked on it some but now I have to put it aside. I also used maplotlib.

For an html view of a jupyter notebook of a start on the Star Trek Medical Dasboard see http://www.babarehner.com/ewrench1011/Python/index.html and click on PyTrek Medical Dashboard on the left menu bar. If doing it for real I would probably use gridspec in mathplotlib

Cheers,

Mike

From: CentralOH [mailto:centraloh-bounces+mrehner=e-wrench.net at python.org] On Behalf Of Eric Floehr
Sent: Tuesday, March 6, 2018 12:01 PM
To: Mailing list for Central Ohio Python User Group (COhPy)
Subject: Re: [CentralOH] Python Graph Help

Thanks Shareef!

That is perfect!


On Fri, Mar 2, 2018 at 4:06 PM, Shareef Dabdoub <shareef at dabdoub.net<mailto:shareef at dabdoub.net>> wrote:
I don't think the example figure came through, so:

[cid:image001.png at 01D3B5A7.71EE60D0]
​

On Fri, Mar 2, 2018 at 4:05 PM, Shareef Dabdoub <shareef at dabdoub.net<mailto:shareef at dabdoub.net>> wrote:
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<mailto:mrehner at e-wrench.net>> wrote:
https://datavizcatalogue.com/

Cheers,

Mike

From: CentralOH [mailto:centraloh-bounces+mrehner<mailto:centraloh-bounces%2Bmrehner>=e-wrench.net at python.org<mailto: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<mailto:CentralOH at python.org>
https://mail.python.org/mailman/listinfo/centraloh



_______________________________________________
CentralOH mailing list
CentralOH at python.org<mailto: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/20180307/b7ad62b4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5153 bytes
Desc: image001.png
URL: <http://mail.python.org/pipermail/centraloh/attachments/20180307/b7ad62b4/attachment-0001.png>


More information about the CentralOH mailing list