On 2015-07-09 07:40, Jonno wrote:
> I was thinking of doing that or having 2 surface plots but I think it
> would be visually quite confusing.
> I was trying to think of an example since I'm sure someone has come up
> with a nice way to display this kind of data.
> Imagine if the data was average temperature (a) and average rainfall (b)
> for a region in the world (lat/long = x,y). The goal is to display the
> data such that it's obvious where the locations are that have closest to
> the ideal temp/rain combination.
> How would you go about that?

        It's not an easy thing to visualize in general.  You might want to look 
at approaches to visualizing complex functions (i.e., functions whose 
input and output are both complex variables).  These essentially map 
pairs (a, b) to pairs (x, y) as in your situation, and mathematicians 
have come up with various ways to visualize them.  Some are described at 
https://www.pacifict.com/ComplexFunctions.html and the wikipedia article 
at https://en.wikipedia.org/wiki/Complex_analysis has some links in the 
references to web pages for graphing such functions.

        If the data are measured at (or can be reasonably reduced to) discrete 
points (as temp/rainfall are likely to be), another possibility is a 
scatterplot using, say, the color and size of the markers as indicators 
of the two variables (e.g., red/blue for hot/cold temp, larger/smaller 
circles for higher/lower rainfall).

        In some cases, like your example with temperature and rainfall, you may 
instead be able to combine the two output dimensions into a single one 
that somehow captures the overall "distance" from the ideal point.  That 
is, for a given point, if your goal is to show how close it is to the 
ideal *combination* of temp and rain, you may not need to display how 
close it is on each dimension separately, but just how close it is to 
the ideal overall.  Exactly how to compute this would vary based on the 
data (e.g., standardizing the values and taking the euclidean distance 
from the ideal).

        Your temp/rainfall example caught my eye because a few years ago I did 
a blog post on a similar topic, considering temperature and humidity 
(http://iq.brenbarn.net/2011/11/18/good-days-mate/).  There I decided to 
graph just a single variable, namely the number of days on which either 
temperature *or* humidity is outside a "comfortable" range.  Obviously 
this approach may not make sense for every situation.  But what I mean 
is that, in some cases, you can use domain-specific knowledge about what 
the dimensions mean to combine them into one dimension that approximates 
what it is you're trying to illustrate with the graph.


-- 
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is no 
path, and leave a trail."
    --author unknown

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to