More Matplotlib problems

Following an upgrade to some Python libraries, I found that problems with plotting from Matplotlib causing Python to crash were recurring (previously reported here). When called from Excel with pyxll this was also causing instant crashes of Excel.

I eventually found the problem was with the latest version of Freetype, and after downgrading to release 2.10.4, and then upgrading Scipy to the latest version, everything went back to working normally again.

The procedure to downgrade to a specific package using Conda is:

conda install freetype==2.10.4
Posted in Excel, Link to Python, PyXLL | Tagged , , , , , | 3 Comments

Transatlantic Sessions and Sarah Jarosz

Transatlantic Sessions (Wikipedia tells me) is the collective title for a series of musical productions by Glasgow-based Pelicula Films Ltd, funded by- and produced for BBC Scotland, BBC Four and RTÉ of Ireland. The productions comprise collaborative live performances by various leading folk, bluegrass and country musicians from both sides of the North Atlantic, playing music from Scotland, Ireland, England and North America, who congregate under the musical direction of Aly Bain and Jerry Douglas to record and film a set of half-hour TV episodes. Wikipedia

Here are some samples featuring Jerry Douglas and Sarah Jarosz (accompanied by Danny Thompson on double bass), followed by a rockier (not Transatlantic) session from Sarah Jarosz:

… and an earlier session with John Martyn and Kathy Mattea plus Jerry Douglas and Danny Thompson:

Posted in Bach | Tagged , , , , , | Leave a comment

VBA procedures for the Numerical Analysis of Tabular Functions

Long time on-line friend Alfred Vachris has recently been converting Fortran code developed through his working career into VBA:

I had the opportunity to work at Grumman while going to Graduate School and they gave me a part-time job as a programmer. The first day on the job, I was handed a copy of A guide to FORTRAN programming by Daniel McCracken. It was love at first sight. I was a Mathematics major from Notre Dame, but all my courses were focused on theoretical mathematics rather than a more engineering focused piratical mathematics. I switched over to Aeronautical Engineering during my senior year. And then followed up by going to Graduate School for a degree in Astronautics.

In the early 1960’s I discovered an article in Design News, a trade magazine, that featured a short article on the Aitken Graphical Construction for generating additional points on a Parabola. This article became the foundation of my efforts to then put together my Tool Kit of codes for Tabular functions.

I am re-factoring the original FORTRAN code to Excel VBA.  I was first posting on WordPress: https://alfred-excel-vachris.com/author/excel1star/
But I find it much easier to post PDF documents on LinkedIn.

Here is a list of LinkedIn posts related to the Toolkit:
Aitken
https://www.linkedin.com/posts/alfredvachris_aitkens-graphical-construction-for-a-parabola-activity-6742091467516362752-_g34

Aitken Demonstration
https://www.linkedin.com/posts/alfredvachris_a-user-controlled-demonstration-of-the-aitken-lagrange-activity-6680575526626697217-DOCC

Aitken Variation – Hermitian Interpolation
https://www.linkedin.com/posts/alfredvachris_implicit-hermitian-interpolation-based-on-activity-6687450493733609473-P0Vu

Arc Length
https://www.linkedin.com/posts/alfredvachris_arc-length-calculation-for-2-d-and-3-d-tabular-activity-6557787121778774016-lTcu

Non-Linear Interpolation
https://www.linkedin.com/posts/alfredvachris_vba-project-non-linear-interpolation-of-activity-6765296370187280384-bcKb

Graphical Twist – Alternate Brent Root Finding
https://www.linkedin.com/posts/alfredvachris_a-graphical-twist-for-inverse-quadratic-root-activity-6745791760284344321-2l6A

Root Finding Examples – Polynomials
https://www.linkedin.com/posts/alfredvachris_my-root-finder-applied-to-a-collection-of-activity-6745865688365195264-8iws/

https://www.linkedin.com/posts/alfredvachris_myrootfinding-application-for-various-examples-activity-6746237834690105345-7ZWu/

Slope: Numerical Differentiation of Tabular Functions
https://www.linkedin.com/posts/alfredvachris_slope-numerical-differentiation-of-tabular-activity-6835626747069792256-XClT

Tangent Estimates
https://www.linkedin.com/posts/alfredvachris_a-collection-of-tangent-estimates-for-numerical-activity-6841109472837021696-RovK

For the benefit of those (like me) not familiar with how Linkedin displays pdf documents, to display the full text and make links active:

Scroll to the bottom of the displayed page and click the “full-screen” icon at the bottom right:

At the top of the page click on “Accessibility Mode”, or the download icon:

Posted in Coordinate Geometry, Curve fitting, Excel, Fortran, Maths, Newton, UDFs, VBA | Tagged , , , , , , | 1 Comment

Larkin Poe

Larkin Poe is an American roots rock band originally from north Georgia, currently based in Nashville, Tennessee,[1] and fronted by sisters Rebecca Lovell (born January 30, 1991) and Megan Lovell (born May 12, 1989). Featuring strong southern harmonies, heavy electric guitar riffs, and slide guitar, they are often touted as “the little sisters of the Allman Brothers“.[2] The band performed at the 2014 and 2016 Glastonbury Festival and were voted “Best Discovery of Glastonbury 2014” by the UK’s The Observer.

They are great musicians, performing a great variety of musical styles. Here are a few samples.

Posted in Bach | Tagged | Leave a comment

Display Matplotlib animations in Excel

The latest version of pyxll (5.4.0) allows animations generated in Matplotlib to be simply copied to Excel. A spreadsheet with the examples shown below, and the associated Python code can be downloaded from:

Animations2.zip

The screenshot below shows the simple example included in the pyxll documentation, and an animation of a 3D line graph from How to Animate Plots in Python. Learn the basics of …

Much more complex animations are also possible, such as these 3D surface animations from the SciPython Blog:

The Matplotlib animation functions also allow much smoother animations of the Mandelbrot Function than can be achieved with the VBA code I posted last year. The screenshot below shows input for generating a single Mandelbrot image on the left, and an animation zooming in on any defined point on the right:

If the “Update” input (Cell O9) is set to True (or 1) the animation will regenerate when any input value is changed, returning the new animation below the function input cell, and also the maximum zoom factor and the time to generate the animation in seconds. Note that the animation process is quite slow for complex images, and is approximately proportional to the number of steps squared. The example shown with 100 steps took almost 8 minutes; 10 steps will take less than 10 seconds. Once the animation has been generated it is saved with the Excel file, and will run without being regenerated, so the Update input should be set to False (or 0). The animation below shows the results of 100 steps, each zooming in by a factor of 1.2, with 200 milliseconds interval between each step:

The link at the top of this post includes a spreadsheet with all the animations shown above, and the Python code used to generate them. The code to generate new animations requires Python and Matplotlib, and the link to transfer new animations to the spreadsheet requires pyxll to run, but the animations saved with the spreadsheet will run without any external software.

Posted in Animation, Drawing, Excel, Link to Python, Maths, Newton, NumPy and SciPy, PyXLL, UDFs | Tagged , , , , , , , | 3 Comments