11 votes
Accepted

Visualising Maxwell's equations using MATLAB

Here I have an example: ...
user avatar
  • 8,007
6 votes
Accepted

Should a colorbar have constant values throughout a simulation?

The selection of colormap should be based on your dataset and audience, e.g., you do not want to use a colormap that have some cultural background for a group of people. Also, if your images are going ...
user avatar
  • 8,007
6 votes

What determines the usual chemistry textbook plots of atom orbitals?

Your intuition is right, for example in 3D Orbitals (German Wikipedia) the caption explicitly states that 90% iso-surfaces are used. I have however seen different percentages before where the results ...
user avatar
  • 156
5 votes

Python package for (adaptive) function plotting

Yes. Sage can plot functions adaptively; the link is to a 3d implementation, but presumably, there is an analogous 2d implementation. You could use this function that samples adaptively 1-d functions....
user avatar
5 votes
Accepted

Estimation of viscosity from critical properties

You can use Plot Digitizer and extract the data points in your image graph as a xml file and then you can parse it by using Python. It's pretty straightforward. You need to import the image of your ...
user avatar
4 votes
Accepted

WRL and VRML to Matplotlib/Numpy

{Assuming you still need the code} Let A1.wrl is your wrl file. ...
user avatar
4 votes
Accepted

Python package for (adaptive) function plotting

It sounds like you want the multi-precision plot function from SymPy, which is capable of plotting arbitrary black-box functions over a given range. ...
user avatar
  • 6,841
4 votes

Should a colorbar have constant values throughout a simulation?

I agree that using the same color scale is generally good practice. Not doing so is confusing. Now, as you note, there are cases where this doesn't leave very much information in each picture. In such ...
user avatar
4 votes
Accepted

Nice plot of f(x)

Using Python and mpmath: import matplotlib import mpmath f = lambda z: z**3-z+1 mpmath.cplot(f, points=100000) Easy peasy.... See here for the documentation on <...
user avatar
  • 6,066
3 votes

Having smoother contour plots in MATLAB

Is the white part NaNs? If so, then you will need to use some sort of extrapolation to smooth that region. The function inpaint_nans may be appropriate (it smoothly fills in NaN regions, essentially ...
user avatar
  • 336
3 votes

Satisfying Periodic Boundary Conditions while plotting spherical particles inside a cube

A quick and dirty solution is to plot a phantom sphere outside the cube on the opposite side, and then apply clipping to the cube boundary.
user avatar
  • 3,789
3 votes

How to make scatter plots of scalar fields with free software?

Points for a scatterplot of a probability density function can simply be sampled from it. I used the Psi(X1, X2) you defined in your linked post. The number of ...
user avatar
  • 156
3 votes
Accepted

Help on writing sofware: general guidelines, in particular separation of computation and visualization

My first question is, when it comes to writing the software what is the best practice for the separation of these steps? Should a program do all of these steps or is it better to divide the steps ...
user avatar
3 votes

How to plot function with evenly spaced x values in Matlab

You can use linspace function, x=linspace(-1,3,101); func=exp(x-sqrt(2))-cos(x-sqrt(2))-(x-sqrt(2)); plot(x,func,'or');
user avatar
  • 643
3 votes

How can one produce a proper streamline plot?

You can calculate the stream function yourself, and from it you can draw contours or streamlines of constant $\psi$. Let us assume you are on a two-dimensional incompressible flow $\mathbf{u}=(u,v,0)^...
user avatar
  • 261
3 votes
Accepted

Strong scalability plot, HPC

As sensitive_scientist mentioned, Measuring Parallel Scaling Performance provides the information you want on how to calculate strong\weak scaling. I've plotted your data in a way I consider it the ...
user avatar
  • 8,362
3 votes
Accepted

Plot a multi-variable equation in (discontinuous) regions

First, you originally wrote that your equation is $\cos(K)=5 \text{ sinc}(5.12\sqrt{E})- \cos(5.12\sqrt{E})$, but you clearly meant $\cos(K)=5 \text{ sinc}(5.12\sqrt{E}) + \cos(5.12\sqrt{E})$ Second, ...
user avatar
  • 1,133
3 votes

SciPy 3d plotting Integral of $\int x^y dx$ for $y$ in $[-4,4]$

As you may know: $$ \int x^y \, dx = \dfrac{x^{y+1}}{y+1},$$ with $y \neq 1.$ If you want to plot the function $ \dfrac{x^{y+1}}{y+1}$ for a specific $y$ using Matplotlib, here is the answer: ...
user avatar
  • 145
3 votes
Accepted

Efficiently plot a finite element mesh solution with Matplotlib

You might be interested in trying other visualization tools such as ParaView, Mayavi or PyVista. But, since the question is about Matplotlib, I would suggest that you use ...
user avatar
  • 8,007
3 votes

Graphing electric potential of a ring of charge using MATLAB help

I received a solution to this question from MATLAB's community. Essentially, I need to specify which contour lines to plot using the 'levels' spot on the 'contour()' command. Levels allows you to ...
user avatar
  • 163
3 votes
Accepted

Graphing electric potential of a ring of charge using MATLAB help

You don't need symbolic variables to compute the approximated potential for your Riemann sums. You can just use meshgrid to evaluate the potential in each point of ...
user avatar
  • 8,007
3 votes
Accepted

How to draw a vertical line in Paraview Line Chart

I would add an extra variable, that goes between the max and min of your other variables and only changes value when your method changes, and, thus, connects them as a sum of step functions. In some ...
user avatar
  • 10.8k
3 votes

How to remove singularit​ies/discon​tinuities on 3D plots in Matlab?

MATLAB doesn’t plot where there are NaNs, so you can replace some of your data with NaNs to make a clean jump. I don’t know which is a bigger lie, a clean jump or a strange wiggle. That’s up to your ...
user avatar
  • 10.8k
2 votes

Visualising Maxwell's equations using MATLAB

From browsing some forum posts, it appears that the numerical solution to these equations is not trivial to obtain. See, for example, this discussion (admittedly dated now). You indicate in your post ...
user avatar
2 votes
Accepted

Plot a surface from data sets in MATLAB

You may be better served with a slightly different method of surface plotting, especially if you're having memory issues. What you're doing right now is actually two separate things: Interpolating ...
user avatar
2 votes

Help on writing sofware: general guidelines, in particular separation of computation and visualization

Should a program do all of these steps or is it better to divide the steps between different scripts and save the data in between? Keep them separate. The reason to consider integrating a ...
user avatar
2 votes
Accepted

How to plot a price level matrix in Matlab?

I just found the in-built function I was looking for: "imagesc". For example: >> imagesc(eye(4)); colorbar gives this
user avatar
2 votes
Accepted

Visualise data under Tecplot

This is the content of a sample Tecplot data file. Data is one dimension i.e. U vs. X for 20 points. I was using a C program to solve my equations and at the end of my program, I had a small ...
user avatar
2 votes

How to calculate grid coordinates of the centroid based on four attributes in a spider chart

I'm going to suggest something different than your proposal to see what you think: try a radar chart. The main advantage of that chart is that axis values will correspond to the scores you are talking ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible