Comments (2)
@JosephBARBIERDARNAL to investigate!
from the-python-graph-gallery.
Hi @ponnhide ! this looks pretty good!
Have you consider developing a slightly more intuitive API? For example, this code:
#heatmap
values_all = []
arcdata_dict = collections.defaultdict(dict)
with open("pycircos/sample_data/example_data_rect_gradual.csv") as f:
f.readline()
for line in f:
line = line.rstrip().split(",")
name = line[0]
start = int(line[1])-1
end = int(line[2])
width = end-start
if name not in arcdata_dict:
arcdata_dict[name]["positions"] = []
arcdata_dict[name]["widths"] = []
arcdata_dict[name]["values"] = []
arcdata_dict[name]["positions"].append(start)
arcdata_dict[name]["widths"].append(width)
arcdata_dict[name]["values"].append(float(line[-1]))
values_all.append(float(line[-1]))
vmin, vmax = min(values_all), max(values_all)
for key in arcdata_dict:
circle.heatmap(key, data=arcdata_dict[key]["values"], positions=arcdata_dict[key]["positions"],
width=arcdata_dict[key]["widths"], raxis_range=[630,670], vmin=vmin, vmax=vmax,
cmap=plt.cm.viridis)
I believe it can easily be wrapped around a function with a few arguments since every user will use it the same way. Is that something you have thought about?
from the-python-graph-gallery.
Related Issues (20)
- aquarel lib for easy styling in matplotlib HOT 2
- page is broken HOT 1
- Update title meta in header HOT 1
- we need to fill this page! HOT 2
- great table in python HOT 2
- add post on how to play with cmap, norm and reversing HOT 1
- post on how to use trans.axes trans.fig HOT 1
- matplotlib has a function for polar chart!
- Update the meta of this post that is wrong
- read blogpost
- Reproduce those waffle charts
- Seaborn page: fix the TODO section about functions HOT 1
- available fonts in matplotlib
- Scatterplot plotly HOT 1
- Add logo on top of posts HOT 1
- Scatterplot function section
- waffle section HOT 1
- post on how to change default matplotlib params + post on rcParams
- matplotlib to plotly converter !!!! ggplotly in python
- plotnine + matplotlib in a single chart
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 the-python-graph-gallery.