tommbendall / tomplot Goto Github PK
View Code? Open in Web Editor NEWThe Only Matplotlib PDE Library Of Tom
License: MIT License
The Only Matplotlib PDE Library Of Tom
License: MIT License
https://github.com/tommbendall/tomplot/blob/main/tomplot/data_extraction.py#L458
panel_ids
should be a list: [panel_ids]
I don't know if this is a big issue, as you don't often want to plot a completely constant field! However, I noticed this when trying to verify that my initial field was indeed a constant value.
They are currently not tested
On machines without latex, we have to comment out set_tomplot_style()
. It would be better to allow an exception in this situation.
The data extraction and reshaping routines don't have unit-tests -- and these have suffered from some bugs which would have been caught by having unit-tests
It would be nice to have the functionality to plot a diagnostic/prognostic along just one axis.
For example, a plot of temperature against height at a given horizontal point
The reshape function doesn't order the data points properly and will mix up different heights and not reshape correctly.
The original code
# for lev_idx in range(num_levels):
# data_slice = slice(lev_idx, num_hori_points*num_levels+lev_idx, num_levels)
# field_data[:, lev_idx] = data['field'].values[data_slice]
# coords_X[:, lev_idx] = data['X'].values[data_slice]
# coords_Y[:, lev_idx] = data['Y'].values[data_slice]
# coords_Z[:, lev_idx] = data['Z'].values[data_slice]
# for idx, _ in enumerate(other_arrays):
# new_other_arrays[idx][:, lev_idx] = data[f'other_{idx}'].values[data_slice]
The Hack fix
for hori_point in range(num_hori_points):
hori_index = hori_point*num_levels
this_X, this_Y = data['X'].values[hori_index], data['Y'].values[hori_index]
data_column = data[(np.isclose(data['X'], this_X)) &
(np.isclose(data['Y'], this_Y))]
data_column = data_column.sort_values(by=['Z'])
field_data[hori_point,:] = data_column['field'].values[:]
coords_X[hori_point,:] = data_column['X'].values[:]
coords_Y[hori_point,:] = data_column['Y'].values[:]
coords_Z[hori_point,:] = data_column['Z'].values[:]
for idx, _ in enumerate(other_arrays):
new_other_arrays[idx][hori_point,:] = data_column[f'other_{idx}'].values[:]
There needs to be an example showing how to use the convergence plot
I'm not sure that the vertical slice data is ordered by horizontal coordinate, which means it can't be used with the "contour"
method. This should be straightforward to do.
It would be nice to generate automatic paddings for colorbar and axes labels
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.