## Scatterplot with marginal histograms

Here’s a code snippet that created a scatterplot and adds marginal histograms. Here’s the output:

Here’s a code snippet that created a scatterplot and adds marginal histograms. Here’s the output:

Posted in array, Histograms, Julia, Plots.jl, Plotting
Tagged Histogram, Julia, Plots.jl
Leave a comment

Every experimental measurement in physics includes sources of noise. Of course, we try to minimize the sources of noise, but there is a limit to this ability (thermal noise, for instance, can be minimized, but not eliminated). Consequently, it often … Continue reading

Posted in data analysis, Interactive, Julia, Smoothing
Tagged Data, Julia, Julia 1.6.3, Noise Removal, Smoothing
Leave a comment

I’m teaching Statistical and Thermal Physics this semester using Gould and Tobochnik’s text of the same name. The text comes with Java programs to run simulations to help students (and me!) gain understanding about how systems with large numbers of … Continue reading

Posted in Ideal Gas, iPython, iPython Notebook, Matplotlib, Plotting, Statistical Physics
Leave a comment

(Updated 11-Jan-2022; fixed broken links and updated notebook) This started out as a way to make sure I understood the numpy array slicing methods, and builds on my previous post about using scipy to fit data. I define a 3 parameter … Continue reading

Posted in curve fitting, data analysis, error bars, iPython, Matplotlib, Plotting
4 Comments

Here’s a common thing scientists need to do, and it’s easy to accomplish in python. Suppose that you have a data set consisting of temperature vs time data for the cooling of a cup of coffee. We’ll start by importing … Continue reading

Posted in curve fitting, data analysis, error bars, Matplotlib, Plotting
Tagged curve fitting, error bars, scipy
4 Comments

I’m working on a text on computational physics whose primary goal is to create something useful for a one semester introductory course that all our physics majors (and now chemistry majors too) will be required to take. I want students … Continue reading

Posted in data analysis, Interesting Links, iPython, Pandas, Plotting
Tagged csv, data file, Pandas, reading, stats
Leave a comment

I’m back to posting now that I am on sabbatical; things have evolved on WordPress in the last year, and now it’s easy to post source code. See the following link so that you can see read about how easy … Continue reading

Here’s a simple script which is a good starting point for animating a plot using matplotlib’s animation package (which, by their own admission, is really in a beta status as of matplotlib 1.1.0). I find the code needed to perform … Continue reading

Posted in Animation, Matplotlib, Plotting
Tagged animation, iterator, matplotlib, plot, snippet
11 Comments