diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a1c58bbe2..f7fba502f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -5,11 +5,11 @@ How to contribute? ================== Contributions of any size are greatly appreciated! You can -make a significant impact on ultraplot by just using it and +make a significant impact on UltraPlot by just using it and reporting `issues `__. The following sections cover some general guidelines -regarding ultraplot development for new contributors. Feel +regarding UltraPlot development for new contributors. Feel free to suggest improvements or changes to this workflow. .. _contrib_features: @@ -46,7 +46,7 @@ Write tests Most modern python packages have ``test_*.py`` scripts that are run by `pytest` via continuous integration services like `Travis `__ -whenever commits are pushed to the repository. Currently, ultraplot's continuous +whenever commits are pushed to the repository. Currently, UltraPlot's continuous integration includes only the examples that appear on the website User Guide (see `.travis.yml`), and `Casper van Elteren ` runs additional tests manually. This approach leaves out many use cases and leaves the project more @@ -203,7 +203,7 @@ Here is a quick guide for submitting pull requests: base: master Note that you can create the pull request before you're finished with your -feature addition or bug fix. The PR will update as you add more commits. ultraplot +feature addition or bug fix. The PR will update as you add more commits. UltraPlot developers and contributors can then review your code and offer suggestions. .. _contrib_release: diff --git a/WHATSNEW.rst b/WHATSNEW.rst index e112caac9..e40b99c43 100644 --- a/WHATSNEW.rst +++ b/WHATSNEW.rst @@ -23,7 +23,7 @@ submitting your own changes. Please note that when classes, functions, keywords, or settings are deprecated, they are not removed -- using the old syntax will result in a warning rather than - an error and preserve the original functionality. Since ultraplot adheres to `semantic + an error and preserve the original functionality. Since UltraPlot adheres to `semantic versioning `__, we will not consider removing the deprecated syntax until the first major release (i.e., version 1.0.0). diff --git a/ci/logo.py b/ci/logo.py index 9646e8a6d..e9f791b19 100644 --- a/ci/logo.py +++ b/ci/logo.py @@ -94,4 +94,104 @@ transparent = True, bbox_inches = "tight", ) + +fig.savefig( + "UltraPlotLogo.png", + transparent = True, + bbox_inches = "tight", + ) +fig.show() + + +# %% +import ultraplot as plt, numpy as np + +from matplotlib.font_manager import FontProperties +from matplotlib import patheffects as pe +from matplotlib.patches import Rectangle +from scipy.ndimage import gaussian_filter + +font = FontProperties(fname='./PermanentMarker-Regular.ttf') + + +fs = 38 +left = 0.5 +sw = 3 +fig, ax = plt.subplots(figsize = (2, 2)) +ax.text(left, 0.52, "Ultra", + fontsize = fs, + fontproperties = font, + va = "bottom", + ha = "center", + color = "steelblue", + path_effects = [ + pe.Stroke(linewidth = sw, foreground = "white"), + pe.Normal(), + ], + transform = ax.transAxes) +ax.text(left, 0.48, "Plot", + fontsize = fs, + # fontproperties = font, + va = "top", + ha = "center", + color = "white", + path_effects = [ + pe.Stroke(linewidth = sw, foreground = "steelblue"), + pe.Normal(), + ], + transform = ax.transAxes) + +shift = 0.033 +import colorengine as ce + +colors = np.linspace(0, 1, 4, 0) +# colors = plt.colormaps.get_cmap("viko")(colors) +ax.axis(False) +ax.axis("square") +# fig.set_facecolor("lightgray") + + +# Create checkerboard pattern +n_squares_x, n_squares_y = 20, 8 # Adjust number of squares +square_size = 0.1 # Size of each square + + +fig_aspect = fig.get_figwidth() / fig.get_figheight() +square_size_y = 0.1 # Base square size in y direction +square_size_x = square_size_y / fig_aspect # Adjust x size to maintain square shape + +n_squares_x = int(1.0 / square_size_x) + 1 # Calculate number of squares needed in x direction + +# Create alpha mask with Gaussian fade +x = np.linspace(-2, 2, n_squares_x +) +y = np.linspace(-2, 2, n_squares_y) +X, Y = np.meshgrid(x, y) +R = np.sqrt(X**2 + Y**2) +alpha = np.exp(-R**2/0.75) # Adjust the 1.0 to control fade rate +alpha = gaussian_filter(alpha, sigma=0.5) # Adjust sigma for smoothness + +# Create colormap gradient +cmap = plt.colormaps.get_cmap("viko") # Choose your colormap + +for i in range(n_squares_x): + for j in range(n_squares_y): + if (i + j) % 2 == 0: # Checkerboard pattern + color = cmap(i/n_squares_x) # Color varies along x-axis + rect = Rectangle( + (i*square_size_x, j*square_size_y + 0.075), + square_size_x, square_size_y, + facecolor=color, + alpha=alpha[j, i], + transform=ax.transAxes + ) + ax.add_patch(rect) + + + +fig.savefig( + "UltraPlotLogoSquare.png", + transparent = True, + bbox_inches = "tight", + ) fig.show() diff --git a/docs/_static/logo_blank.svg b/docs/_static/logo_blank.svg index e16a83751..afdd3d11c 100644 --- a/docs/_static/logo_blank.svg +++ b/docs/_static/logo_blank.svg @@ -1,16 +1,16 @@ - + - 2022-06-22T14:25:51.049218 + 2025-01-04T11:16:59.222545 image/svg+xml - Matplotlib v3.5.2, https://matplotlib.org/ + Matplotlib v3.8.4, https://matplotlib.org/ @@ -21,300 +21,1448 @@ - +" style="fill: none"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.00009"/> - + - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.006614"/> - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.000727"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.003897"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.035437"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.016772"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.000482"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" clip-path="url(#p0940925877)" style="fill: #ac5935; opacity: 0.001879"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + diff --git a/docs/_static/logo_long.png b/docs/_static/logo_long.png index 480c19a76..79028e65e 100644 Binary files a/docs/_static/logo_long.png and b/docs/_static/logo_long.png differ diff --git a/docs/_static/logo_long.svg b/docs/_static/logo_long.svg index 0f2a5bfcb..afdd3d11c 100644 --- a/docs/_static/logo_long.svg +++ b/docs/_static/logo_long.svg @@ -1,16 +1,16 @@ - + - 2022-06-22T14:25:52.780693 + 2025-01-04T11:16:59.222545 image/svg+xml - Matplotlib v3.5.2, https://matplotlib.org/ + Matplotlib v3.8.4, https://matplotlib.org/ @@ -21,498 +21,1448 @@ - +" style="fill: none"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.006614"/> - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.000727"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.003897"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.035437"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.016772"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.000482"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" clip-path="url(#p0940925877)" style="fill: #812b1e; opacity: 0.016772"/> + + + + + + + + + + + + + + + - - + + - - + + - - + + diff --git a/docs/_static/logo_social.png b/docs/_static/logo_social.png index 8cf153558..c11651981 100644 Binary files a/docs/_static/logo_social.png and b/docs/_static/logo_social.png differ diff --git a/docs/_static/logo_social.svg b/docs/_static/logo_social.svg index ad6108a92..afdd3d11c 100644 --- a/docs/_static/logo_social.svg +++ b/docs/_static/logo_social.svg @@ -1,16 +1,16 @@ - + - 2022-06-22T14:25:51.550193 + 2025-01-04T11:16:59.222545 image/svg+xml - Matplotlib v3.5.2, https://matplotlib.org/ + Matplotlib v3.8.4, https://matplotlib.org/ @@ -21,302 +21,1448 @@ - +" style="fill: none"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.006614"/> - +" clip-path="url(#p0940925877)" style="fill: #4f1a3d; opacity: 0.000727"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.003897"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.035437"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.016772"/> - +" clip-path="url(#p0940925877)" style="fill: #3e2e5e; opacity: 0.000482"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" style="fill: #ffffff"/> - - + + diff --git a/docs/_static/logo_square.png b/docs/_static/logo_square.png index 40da64f78..c11651981 100644 Binary files a/docs/_static/logo_square.png and b/docs/_static/logo_square.png differ diff --git a/docs/index.rst b/docs/index.rst index d430fdeaa..3a98c21ba 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,12 +5,12 @@ it should at least contain the root `toctree` directive. ======= -ultraplot +UltraPlot ======= A succinct `matplotlib `__ wrapper for making beautiful, publication-quality graphics. This project -is `published on GitHub `__ and can +is `published on GitHub `__ and can be cited using its `Zenodo DOI `__. .. toctree::