Comments (4)
Yes, this is known (#44).
from python-ternary.
So, do you have any good solutions?
I don't know how to fix it by slightly moving the lines outward by the line-width.
from python-ternary.
Can you post the code that generated the plot?
from python-ternary.
def Color_point(x, z, y, scale):
w = 255
x_color = x * w / float(scale)
y_color = y * w / float(scale)
z_color = z * w / float(scale)
r = math.fabs(w - y_color) / w
g = math.fabs(w - x_color) / w
b = math.fabs(w - z_color) / w
return (r, g, b, 1.)
def Generate_heatmap_data(scale):
from ternary.helpers import simplex_iterator
d = dict()
for (i, j, k) in simplex_iterator(scale):
d[(i, j, k)] = Color_point(i, j, k, scale)
return d
offset, r, s = 0.3, 0.02, 100
x, y = (np.sqrt(3) + 1) * r, -2 * r
ct, cd, cq, c = 'r', 'y', 'b', '#f0f0f0'
fig, tax = ternary.figure(scale=s)
data = Generate_heatmap_data(scale=100)
tax.heatmap(data, style='dual-triangular', use_rgba=True, colorbar=False)
tax.boundary(linewidth=2, zorder=3)
tax.set_background_color(color=c, alpha=0.2)
tax.gridlines(multiple=20, linewidth=1, alpha=1,
horizontal_kwargs={'color': cd},
left_kwargs={'color': ct},
right_kwargs={'color': cq})
tax.top_corner_label('Dependence', fontweight='bold', position=(0 - 0.06 - x, 1 + 0.12 + 2 * x, 0), rotation=0,
color=cd)
tax.left_corner_label('Low streamflow', fontweight='bold', position=(0 - 0.05 - x, 0 + 0.05 + y, 0), rotation=-45,
color=cq)
tax.right_corner_label('High temperature', fontweight='bold', position=(1 + x, 0 + 0.05 + y, 0), rotation=45, color=ct)
tax.right_axis_label('Relative
tax.left_axis_label('Relative
tax.bottom_axis_label('Relative
tax.ticks(axis='lbr', multiple=20, linewidth=1.5, offset=0.025)
tax.get_axes().axis('off')
tax.clear_matplotlib_ticks()
fig.set_facecolor('#f0f0f0')
tax.show()
from python-ternary.
Related Issues (20)
- Scatter creates equilateral plot HOT 1
- Question on ternary heatmap plot HOT 1
- Can not set the limits of each axis? HOT 1
- Heatmap scale greater than 1 vs less than equal to 1 HOT 4
- Cut off top of triangle? HOT 5
- Problem in making the ternary heatmap if the key interval is not 1. HOT 1
- TernaryAxesSubplot.scatter() skips first default color in version 1.0.8 HOT 1
- How to plot the Ternary Choropleth Map? HOT 3
- Blank Heatmap HOT 6
- Plot Blocking Option
- Custom Axis Directions HOT 2
- Cannot set transparent background HOT 1
- Issues with corner label positions under panning/zooming HOT 4
- change font, and output an equilateral triangle HOT 2
- Can't find a way that works to reduce label overlap. HOT 2
- Update installation metadata
- Remove number
- Text annotations HOT 1
- Add pyproject.toml file for python 3.12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-ternary.