You've probably all seen the Batman plot that can be generated by entering a formula into google Search. Their instant graphing capability turns this complex formula into a scatterplot of 4 series. Copy this formula into Google Search `2*sqrt(-abs(abs(x)-1)*abs(3-abs(x))/((abs(x)-1)*(3-abs(x))))(1+abs(abs(x)-3)/(abs(x)-3))sqrt(1-(x/7)^2)+(5+0.97(abs(x-.5)+abs(x+.5))-3(abs(x-.75)+abs(x+.75)))(1+abs(1-abs(x))/(1-abs(x))),-3sqrt(1-(x/7)^2)sqrt(abs(abs(x)-4)/(abs(x)-4)),abs(x/2)-0.0913722(x^2)-3+sqrt(1-(abs(abs(x)-2)-1)^2),(2.71052+(1.5-.5abs(x))-1.35526sqrt(4-(abs(x)-1)^2))sqrt(abs(abs(x)-1)/(abs(x)-1))+0.9` And you are going to get ## The batman plot in ExcelFor preparation, we need to deconstruct the 4 series in the google formula. I've put these in cells b8-b11
Next we need to create some parameters - what is the range of x for the plot? I've put these in cells b4-b6
Finally, we'll make a title for the chart, in B7.
## How this worksExcel normally needs a table of data to plot, but we don't want to actually create a table of data - rather we want to create an array of data on the fly, based on the range of x, and the f(x) equations that generate associated values for y for each series. The x values are generated with this named range (named x). `=batman!$B$4+(ROW(OFFSET(batman!$A$1,0,0,batman!$B$6,1))-1)*(batman!$B$5-batman!$B$4)/(batman!$B$6-1)` This generates an array of 1000 values for x from -7 to 7, starting like this
We then need another 4 named ranges, ySeries1..4, which will evaluate, for each value of x, a y based on the equation for each series. This looks like this and uses the old Excel4 evaluate formula. It's this that applies each value in the array x against the formulas in b8..b11. Here's an example for ySeries1. `=IFERROR(EVALUATE(batman!$B$8&"+x*0"),"")` a section of the calculated data looks like this.
And we end up with something not too bad.. not as good as the google one, but it'll do ## Applying the general caseSo now we have this chart, we can plot any formulas, for example, these parameters,
Give this chart But let's stick with some odd charts. How about the well known heart plot in google...
gives us Or this simple one
Gives Finally, here's some odd ones for you to try http://www.talljerome.com/NOLA/images/ti/grapherpics.pdf. If you can, then post the parameters on our forum and I'll publish them here. Why not join our forum,follow the blog or follow me on twitter to ensure you get updates when they are available, or take a look at what else is on this site. |