Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/ultraplot/ultraplot/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:
Expand Down Expand Up @@ -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 <https://travis-ci.com>`__
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 <https://github.com/cvanelteren>` runs additional tests
manually. This approach leaves out many use cases and leaves the project more
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion WHATSNEW.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://semver.org>`__, we will not consider removing the deprecated
syntax until the first major release (i.e., version 1.0.0).

Expand Down
100 changes: 100 additions & 0 deletions ci/logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Loading
Loading