4,375 questions
1
vote
1
answer
97
views
Add outline to the 3D barchart
So I worked with ChatGPT to create a 3D bar chart with a gradient effect in Python.
I met a problem that I cannot add outlines to bars. If I do so, it will make the bar transparent. GPT says it is a ...
1
vote
1
answer
98
views
pyqtgraph/PySide6 horizontal gradient flickers when data updates and repeats gradient
Edit: This is potentially a bug with pyqtgraph. See issue created here: https://github.com/pyqtgraph/pyqtgraph/issues/3459
I am using PySide6 with pyqtgraph to display a graph of data where the X-axis ...
3
votes
1
answer
106
views
Area with color gradient
I created this simple ggplot2 plot and would like to generate a vertical color gradient for the area between y = 0 and the respective values, possibly using geom_ribbon (?). However, I haven’t found ...
0
votes
1
answer
150
views
how can I create custom Gradient colors in chakra ui v3
I am using this approach
<Box bgImage="gradients.gradientBluePurple_toR_600" w="64" h="64" />
Here’s my current theme setup:
// src/theme/foundations/theme.ts
...
0
votes
1
answer
91
views
Can I Create a Color Gradient Between Two Values in an Excel Pivot Table?
I need to conditionally format all values between 2 numbers in a pivot table using a color gradient to accentuate the scale of values between that range.
I'd like to not have any color for the rest of ...
3
votes
2
answers
66
views
Pytorch compute graph don't release as expected
import torch
def analyze_your_actual_code(): """分析你的实际代码"""
a = torch.randn(4, requires_grad=True)
print(f"a: {a}")
print(f"a.grad: {a....
0
votes
1
answer
86
views
Why is this background gradient grid not pixel perfect?
At first I thought it was some line-height problem (:root is set to 1.25 which is still divisible by the underlying 4px grid) but it's not ...
Removing the <img> from example or setting it's ...
-2
votes
1
answer
260
views
how to do gradient borders in tailwind CSS?
how to do gradient borders in tailwind CSS? i searched on google but found only custom CSS solutions. We can do the background as gradient with Tailwind. is there any way to apply gradient on border ...
1
vote
0
answers
46
views
GGridges Gradient Fill [duplicate]
I'm using this data to try to plot multiple histograms showing political polarization in Congress over the years (dwnom1). I can get the multiple histogram with ggridges, but everytime I try to apply ...
0
votes
1
answer
306
views
Background Gradients + Noise Combo
I’m trying to replicate the gradient + noise in the image below.
Gradient + Noise:
So far I think I roughly got the 2 gradients covered but really struggle with the noise here. I tried loads of ...
2
votes
2
answers
105
views
How to make the gap not covered by the gradient. Or maybe there are some other ways to achieve this result? [duplicate]
I'm trying to apply a single background gradient to a grid of cards (statistic blocks) in React using Tailwind CSS. The goal is to have the gradient visible only on the cards, while the gaps between ...
-3
votes
1
answer
60
views
Can this curve be made from a rectangle image with CSS? [duplicate]
I have some headers on my website and I was wondering if I can make this curve from a rectangle image with CSS.
This is how it looks like:
Is this possible with CSS?
And I also would like to get a ...
0
votes
2
answers
113
views
How to make a checkbox input with a gradient border?
I made a fancy custom checkbox that animates a gradient in/out when (un)checked. How can I make the checkbox border a gradient, as well? The border gradient should match the fill gradient just like ...
0
votes
0
answers
71
views
Combining CSS gradients and background colours
I'm trying to design the background for the hero section of a project. I've been having trouble getting the gradients and background color to work together as intended.
I've tried adjusting the layer ...
0
votes
1
answer
95
views
Large differences comparing results of linear_sum_assignment and minimize when using jac and hess
Dear stackoverflow users, I am having some troubles with linear assignment problems using the functions linear_sum_assignment and minimize, both from the scipy library. In order to compare more ...
2
votes
1
answer
105
views
More efficient way to compute elementwise gradients (Jacobian) in PyTorch while preserving create_graph
I’m currently using PyTorch’s torch.autograd.functional.jacobian to compute per-sample, elementwise gradients of a scalar-valued model output w.r.t. its inputs. I need to keep create_graph=True ...
0
votes
2
answers
113
views
CSS Linear Gradient not linear [closed]
I want to use a linear-gradient background where I eventually want to control when the gradient should start. Right now I have it set to start at 50%.
I do that like this:
.block{
font-family: '...
0
votes
0
answers
64
views
Color gradient text bug on mobile devices
On this page https://t-a-a-a.net/project-5/ in the desktop view, a gradient runs through the entire text as intended. However, in the mobile view (iPhone), the gradient unintentionally repeats for ...
0
votes
1
answer
81
views
Why does the divergence value at the left and right boundaries show up as 1 instead of the expected 2?
I have tried two different ways of calculating a vector's divergence using Fipy: one using the gradient of its components and the other using face divergence.
For simplicity, I have used a vector such ...
0
votes
1
answer
26
views
gradient not backpropgating to mu
my mu cannot have any valid gradient somehow, here is the code:
import torch
torch.manual_seed(0)
mu = torch.zeros(1, requires_grad=True)
sigma = 1.0
eps = torch.randn(1)
sampled = mu + sigma * eps
...
0
votes
2
answers
340
views
Transition a CSS background-color to a gradient
I have some tiles that have an ordinary background-color and show a CSS gradient on hover, and I want to add a transition between these. I've seen this solution, but as far as I can tell the only way ...
0
votes
0
answers
105
views
FPS drop with Angular Gradient border during SwiftUI animation
I am adding a border and blur effect on a shape during an animation (root view appearing on page) and seeing FPS drops when using an AngularGradient as the color of the border. I dont see the drops ...
1
vote
0
answers
122
views
Get the QColor at an arbitrary position within the 0-1 range of a QGradient
Objective
I want to get the visual color at an arbitrary position within the 0.0-1.0 range of any given QGradient.
This may be necessary to properly compute new intermediate stops between existing ...
0
votes
0
answers
49
views
Run Time of 2 for loops with Gradient calculation
I am trying to run the following code:
for ie in range(100):
energy = torch.tensor([.1 + .1 * ie], dtype = torch.float32, requires_grad = True)
xe = .5 + 20 * (torch.log(energy) - log_01) / (...
1
vote
1
answer
717
views
How to Recreate a Grainy Gradient Background Using SVG
The image below is a snippet of my visual concept in Figma. I used a free plugin to generate this kind of background, known as a noisy or grainy gradient. In my opinion, it looks unique and visually ...
1
vote
1
answer
118
views
Infinite Marquee with gradient text
I need to make an endless running line with gradient text that changes as it moves, as in the example, it works, but there are problems in Safari, everything twitches there and the letters seem to run ...
2
votes
1
answer
109
views
SIR parameter estimation with gradient descent and autograd
I am trying to apply a very simple parameter estimation of a SIR model using a gradient descent algorithm. I am using the package autograd since the audience (this is for a sort of workshop for ...
1
vote
1
answer
58
views
Tensorflow GradientTape Error "inside its context is signficantly less efficient than calling it outside the context"?
I am currently working on Adversarial Attacks on Image dataset. The most important libraries in my project are :
Tensorflow 2.10.1 (with CUDA) (the error is with tensorflow)
Pytorch 1.13.1+cu116
art (...
0
votes
1
answer
116
views
Colour Gradients for QR Codes in Excel using Python
I am new to Python, so please be patient with me.
I am working on a small project to create QR Codes using MS Excel's built-in Python mode, and apply customisations to them.
For this question, I am ...
3
votes
3
answers
181
views
How to calculate the gradient of an n-dimensional array of data in R
I feel like there must be some function in some package that does this, but for the life of me I cannot find one that calculates the gradient of an array of data points (not a function) by simply ...
0
votes
1
answer
73
views
Why am I still seeing a visible gradient animation transition on mobile despite using a slow animation and reducing the background size?
I'm working on a responsive webpage and trying to add a smooth gradient animation to the background. On larger screens, the gradient animation works as expected, but when the screen width is below ...
-1
votes
1
answer
119
views
How can I make a dynamic border with gradient that changes based on mouse position
I'm wondering if the background-image property can be edited in real time via JavaScript, what I'm trying to do has a similar concept to the following question:
How to change the color of the ...
0
votes
1
answer
115
views
How can I put a gradient in a text of a button with css without affecting the background?
Im trying to make a button with white background and the text with a gradient.
&.bricks-background-light {
position: relative;
display: inline-block;
padding: 16px 24px;
border-...
2
votes
1
answer
139
views
How do I create CSS gradients that follow the square root average?
This question stems from this minutephysics video I watched a while back: Computer Color is Broken
It describes how the correct way to blend colors is to use the square root of the average of the ...
0
votes
3
answers
216
views
how to draw such gradient background using css?
I take a photo of sunset and I like such gredient effects from sky to highlight sunset, is there any way to simulate such effect using css? I want to erase those buildings then use it as my webpage ...
0
votes
2
answers
198
views
How to paint a gradient color background of a TDBGrid cell in delphi
My goal is to draw a Delphi TDBgrid cell to have a gradient color from right to left, like the image below:
I used the GradientFillCanvas procedure from the Vcl.GraphUtil unit.
Here is my custom ...
1
vote
2
answers
80
views
Is it possible to create a geom_segment with a gradient between two colors, but the start/end colors change depending of a variable?
I'm building a plot with a discrete Y-axis with multiple pairwise comparisons. However, instead of using text for the labels, I created a secondary plot with color points indicating the 2 groups ...
-2
votes
1
answer
55
views
How to apply css gradient color to background of component similar to the one in the attached screenshot
How can we apply css gradient at one side of the background using pseudo css selectors as per the below screenshot..
enter image description here
I tried with using linear gradient css but its not the ...
0
votes
1
answer
131
views
Color gradient as style on marker
I'm trying to add a bottom-to-top color gradient to my markers, but it's not working as I expected. I also don't quite agree with the radius * 3 but I didn't find another solution to let the circle ...
1
vote
0
answers
57
views
Text cut off with gradient fill and negative letter-spacing when return to line
See my problem with this screenshot
Hello.
I have a problem with a title with negative letter-sacing.
I solde the problem when text in on one line, but when the text return to line, the last character ...
0
votes
0
answers
260
views
Swift: Gradient from blur to transparent
I have a view with a blur effect, and as a subview, I have a scrollview. I would like to add a fading effect at the top and bottom.
The fading effect should go from blur to transparent and should be a ...
1
vote
1
answer
116
views
repeating-conic-gradient treated as simple conic-gradient on chrome print preview?
I have been trying to create a background effect for a certificate design using repeating conic gradient to create blue and transparent rays, using this background value: repeating-conic-gradient(from ...
0
votes
0
answers
135
views
Haversine Loss function: No gradients provided for any variable?
I'm trying to implement a custom loss function, the haversine loss that computes the distance between two points on a sphere. The coordinates of the classes are saved in a csv, hence I have to convert ...
1
vote
1
answer
857
views
Gradient Blur Effect Dart
This time I wish to have a gradient blur effect over the limits of my ScrollingView. So, I have the blur effect at the right position, but I wish the effect grows slowly until the max blur. I don't ...
0
votes
0
answers
38
views
Why is only the top color of my gradient showing in Safari?
background:
radial-gradient(5% 10% at 40% 80%, rgb(255, 98, 0) 100%, #FFB81A00 100%),
radial-gradient(30% 40% at 60% 40%, rgb(255,61,0) 74%, #FF3D0000 100%),
radial-gradient(30% 70% at 40%...
-1
votes
2
answers
352
views
How to do a linear gradient which fades to transparent, not white, in CSS? [duplicate]
I have this as a gradient currently:
background: linear-gradient(
to right,
rgba(var(--white-rgb), 1) 0%,
rgba(var(--white-rgb), 0) 100%
);
With this, on the left side it fades to pure white, ...
2
votes
2
answers
61
views
How do I give gradient and make it a semicircle?
I can give a div this gradient and make it absolute and place it at the right position, but how do I make it semi-circle?
<div
className="absolute top-[50%] right-[-600px] w-[50%] h-[...
0
votes
2
answers
1k
views
How to recreate this circular gradient in CSS from a Figma design?
I'm trying to recreate a circular gradient in CSS that matches the one I designed in Figma. Here's the image for reference:
Circle Gradient
The gradient I have in Figma is defined as:
background: ...
2
votes
2
answers
409
views
Is this possible in Flutter (Android app)?
I was designing a music app, and for the bottom navigation bar, I wanted it to look like in the image. It is a linear gradient blur, but I don't know how to achieve this. Is this possible using ...
0
votes
1
answer
38
views
gradient becomes none after apply mask on trainable variable
When I implement the following code, gradient of x becomes none after apply mask on trainable variable. After removed the mask the gradient is able to be calculated. I am wondering what the reason of ...