Skip to main content

A Matplotlib 3D Extension package for enhanced data visualization

Project description

Matplot3DEx Documentation

Table of Contents

  1. Overview
  2. Installation
  3. Usage
  4. Classes
  5. Advanced Features
  6. More Usage

Overview

Matplot3DEx is an extension of Matplotlib, providing a simplified API for creating a variety of 3D and 2D plots with enhanced customization options. This package aims to facilitate the creation of visually appealing and informative plots for data analysis and visualization tasks.

Installation

To install Matplot3DEx, use the following command:

pip install Matplot3DEx

Usage

Example: 3D Surface Plot

from Matplot3DEx import Matplot3DEx
import numpy as np

# Create a meshgrid for the surface plot
x = np.linspace(-5, 5, 100)
y = np.linspace(-5, 5, 100)
x, y = np.meshgrid(x, y)
z = x**2 - y**2

# Create a 3D surface plot
surface_plot = Matplot3DEx.Surface3D(x, y, z, title='3D Surface Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
surface_plot.show()

ex1

Example: 3D Wireframe Plot

from Matplot3DEx import Matplot3DEx
import numpy as np

# Create a meshgrid for the wireframe plot
x = np.linspace(-5, 5, 100)
y = np.linspace(-5, 5, 100)
x, y = np.meshgrid(x, y)
z = x**2 - y**2

# Create a 3D wireframe plot
wireframe_plot = Matplot3DEx.Wireframe3D(x, y, z, title='3D Wireframe Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
wireframe_plot.show()

ex2

Example: 3D Bar Plot

from Matplot3DEx import Matplot3DEx

# Sample data for 3D bar plot
x = [1, 2, 3, 4, 5]
y = [2, 3, 4, 5, 6]
z = [3, 4, 5, 6, 7]

# Dimensions of the bars
dx = 0.8
dy = 0.8
dz = [1, 1, 1, 1, 1]

# Create a 3D bar plot
bar_plot = Matplot3DEx.Bar3D(x, y, z, dx, dy, dz, title='3D Bar Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
bar_plot.show()

ex3

Classes

The Matplot3DEx package includes the following classes, each designed for specific types of plots:

Class Description
Matplot3DEx.BasePlot Base class for common plot settings (title, labels).
Matplot3DEx.Base3DPlot Extension of BasePlot for 3D plots with Z-axis labels.
Matplot3DEx.Scatter3D 3D scatter plot with customizable color and markers.
Matplot3DEx.Surface3D 3D surface plot with adjustable colormap and transparency.
Matplot3DEx.Wireframe3D 3D wireframe plot with customizable color and linewidth.
Matplot3DEx.Bar3D 3D bar plot with customizable dimensions and color.
Matplot3DEx.Quiver3D 3D quiver plot for vector visualization.
Matplot3DEx.Contour3D 3D contour plot with adjustable colormap and levels.
Matplot3DEx.Heatmap2D 2D heatmap plot with customizable colormap.
Matplot3DEx.AnimatedScatter3D Animated 3D scatter plot for dynamic data visualization.
Matplot3DEx.Boxplot2D 2D box plot with customizable appearance.
Matplot3DEx.Hexbin2D 2D hexbin plot with options for gridsize and colormap.
Matplot3DEx.TriangularMesh3D 3D triangular mesh plot with adjustable colormap.
Matplot3DEx.Streamline3D 3D streamline plot for visualizing vector fields.
Matplot3DEx.ColorSizeScatter2D 2D scatter plot with color and size coding.
Matplot3DEx.GroupedBoxplot2D Grouped 2D box plot for comparing categories.
Matplot3DEx.PairwiseScatterplotMatrix Pairwise scatterplot matrix for exploring relationships.
Matplot3DEx.CorrelationHeatmap Heatmap for visualizing correlation matrices.
Matplot3DEx.HistogramWithKDE Histogram plot with Kernel Density Estimation (KDE).
Matplot3DEx.ViolinPlot Violin plot for visualizing distribution and density.
Matplot3DEx.ParametricCurve 2D plot of a parametric curve.
Matplot3DEx.PolarRose Polar plot representing a rose curve.
Matplot3DEx.ParametricSurface3D 3D parametric surface plot.
Matplot3DEx.SaddleSurface 3D plot of a saddle surface.
Matplot3DEx.QuaternionRotation 3D plot of a vector rotation using quaternions.
Matplot3DEx.TimeSeriesRollingAverage Time series plot with rolling average.
Matplot3DEx.HistogramOutlierDetection Histogram with outlier detection.
Matplot3DEx.ScatterRegressionPlot Scatter plot with linear regression line.
Matplot3DEx.StackedAreaTimeSeries Stacked area plot for time series data.
Matplot3DEx.ConfusionMatrixHeatmap Heatmap for visualizing confusion matrices.

Advanced Features

Matplot3DEx also provides advanced features for specific use cases:

  • Data Science Module: Includes classes for statistical analysis and data exploration.
  • Math Module: Incorporates mathematical plots and functions for mathematical visualizations.
  • Add-Ons Module: Additional classes that extend the functionality of Matplot3DEx.

More Usage

Example: 3D Scatter Plot

import numpy as np
from Matplot3DEx import Matplot3DEx

# Generate sample data
x = np.random.rand(100)
y = np.random.rand(100)
z = np.random.rand(100)

# Create a 3D scatter plot
scatter_plot = Matplot3DEx.Scatter3D(x, y, z, title='3D Scatter Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
scatter_plot.show()

Example: 3D Surface Plot

import numpy as np
from Matplot3DEx import Matplot3DEx

# Generate sample data
x = np.linspace(-5, 5, 100)
y = np.linspace(-5, 5, 100)
x, y = np.meshgrid(x, y)
z = x**2 - y**2

# Create a 3D surface plot
surface_plot = Matplot3DEx.Surface3D(x, y, z, title='3D Surface Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
surface_plot.show()

Example: 2D Heatmap

from Matplot3DEx import Matplot3DEx
import numpy as np

# Generate sample data
data = np.random.rand(10, 10)

# Create a 2D heatmap
heatmap_plot = Matplot3DEx.Heatmap2D(data, title='2D Heatmap', xlabel='X-axis', ylabel='Y-axis')
heatmap_plot.show()

Example: Animated 3D Scatter Plot

import numpy as np
from Matplot3DEx import Matplot3DEx

# Generate sample data
x = np.random.rand(100)
y = np.random.rand(100)
z = np.random.rand(100)

# Create an animated 3D scatter plot
animated_scatter = Matplot3DEx.AnimatedScatter3D(x, y, z, title='Animated 3D Scatter Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
animated_scatter.animate(frames=50, interval=100)

Example: 2D Hexbin Plot

import numpy as np
from Matplot3DEx import Matplot3DEx

# Generate sample data
x = np.random.normal(size=1000)
y = np.random.normal(size=1000)

# Create a 2D hexbin plot
hexbin_plot = Matplot3DEx.Hexbin2D(x, y, gridsize=30, cmap='viridis')
hexbin_plot.show()

Example: 3D Quiver Plot

import numpy as np
from Matplot3DEx import Matplot3DEx

# Generate sample data
x = np.linspace(-5, 5, 20)
y = np.linspace(-5, 5, 20)
z = np.linspace(-5, 5, 20)
x, y, z = np.meshgrid(x, y, z)
u = np.sin(x + y + z)
v = np.cos(x - y - z)
w = np.sin(2 * x)

# Create a 3D quiver plot
quiver_plot = Matplot3DEx.Quiver3D(x, y, z, u, v, w, title='3D Quiver Plot', xlabel='X-axis', ylabel='Y-axis', zlabel='Z-axis')
quiver_plot.show()

Contributing

If you find any issues or have suggestions for improvements, feel free to contribute! Visit the GitHub repository for more details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Matplot3DEx-0.1.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file Matplot3DEx-0.1.tar.gz.

File metadata

  • Download URL: Matplot3DEx-0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for Matplot3DEx-0.1.tar.gz
Algorithm Hash digest
SHA256 f30b86bce840d5c6fee3cf1047363047c55423c94ad6bd348345fb6b45018ef7
MD5 feb0c6e3c30559de9fa497283755346e
BLAKE2b-256 0a60196c4d72d855c64d7284b0dee1f0c45b43b52af4d24ab1e3219fb3b92242

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page