Comments (5)
You just have to stretch the image after it is plotted by matplotlib. Just pull the pop up window's corners until the shape is just right.
Depending on your installation settings, the image may or may not be exactly equilateral as displayed, but it is equilateral as drawn. The error bar takes up some space (which varies based on the ticks of the color bar, the font size, etc.) so it's up to you to properly stretch the image before saving.
If that doesn't work and you need a publication quality image, I recommend that you make the plot with and without the colorbar and use e.g. photoshop or gimp to add the color bar to the image that you are happier with.
from python-ternary.
Manually stretching the image is certainly an option, but my biggest concern is whether the ticks automatically adjust to the stretching, i.e., whether the ticks are parallel to the corresponding side after stretching.
In my installation settings, the plot is still not equilateral even without the colorbar.
AFAIK, this does not happen to heatmapf
nor other plotting functions I have tried.
from python-ternary.
Did you try stretching it? The ticks and labels should move with the axes. The library is specifically programmed to do so for this reason. If that doesn't work please let me know.
FYI some of the images in the documentation were stretched manually. Unfortunately there is not an easy way to determine how much space the various text blocks will take up that I am aware of, which is why the plot isn't automatically resized. There are also local matplotlib options that dictate e.g. default image dimensions, so it's unlikely that the library's behaviors on this matter will change in the near future.
from python-ternary.
I did not try stretching it because I mainly work with IPython notebook with inline image... good to know the ticks and labels will adjust. Also thanks for your elaboration on the issue!
from python-ternary.
You are welcome. In case you haven't seen this before, you can set the default figure size in a notebook with:
%matplotlib inline
matplotlib.rcParams['figure.figsize'] = (10, 6) # inches width and height.
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
- Heatmap polygon triangles and gridlines don't meet exactly HOT 4
- 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.