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)
- prettyplotlib HOT 1
- fill the them section in seaborn.js HOT 1
- Plot size in Notebooks HOT 1
- Logo on top
- correct path chunck code HOT 1
- change figsize with width >8
- improve current post on changing fonts HOT 1
- add some css for the output of pandas df HOT 2
- improve wordcloud section HOT 2
- error in geoplot HOT 2
- Parallel coordinate chart with Python and Matplotlib --> Slope chart with Python and Matplotlib HOT 1
- Propose to add marsilea examples HOT 1
- Background HOT 2
- seaborn and/or matplotlib cmap player
- button for copy code HOT 2
- 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
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.