Code Monkey home page Code Monkey logo

the-python-graph-gallery's Introduction

the-python-graph-gallery's People

Contributors

abonte avatar algogalo avatar amnakamura avatar andru avatar dependabot[bot] avatar ericduminil avatar fortune-uwha avatar holtzy avatar ipekguler avatar iribirii avatar johan456789 avatar josephbarbierdarnal avatar knapikb avatar lisa-ho avatar maslychm avatar mgolos avatar miguelangel43 avatar mmore500 avatar nrslt avatar ozlemtok avatar pamitabh avatar pascaliversen avatar paulbrodersen avatar s-lasch avatar tomicapretto avatar vishalvishw10 avatar ya-am avatar yotkadata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the-python-graph-gallery's Issues

Python sankey options

Hi and thanks for the very useful resource.

I think you’re a little short on sankey options, there’s only matplotlib which is a little basic/ugly. Could consider adding maybe pySankey ?

I don’t know if there are other decent options, there’s floweaver (previously pysankeyview), but it apparently requires other packages such as ipansankeywidget to be displayed.

Get rid of jet

Jet is bad, so it shouldn’t prominently appear in the gallery (e.g. here). The new default viridis should step in nicely.

add .gitignore

Maybe add .gitignore file to root of project and eliminate .DS_Store, node_modules, .vscode and .ipynb_checkpoints from repo. They are local files and do not need versioning.

Matplotlib theme explorer

Add a section in the matplotlib page. Add 26 buttons for the 26 matplotlib prebuilt themes. Clicking on a button should show the theme result in a plot below.
Note that post #199-matplotlib-style-sheets is dedicated to matplotlib themes

Chord charts have been removed from Bokeh

Hi,

Thanks for a great resource. Today I discovered that the chord charts have been removed from Bokeh, and moved to bkcharts. However they are unmaintained, and the example no longer works.

Brad

Adding Plotnine graphs

Hi there, thanks for providing this useful resource!

Half a year ago I was really excited to find https://github.com/has2k1/plotnine , the first really usable ggplot2 implementation in Python. The implementation is so close to ggplot2 that one can even use the ggplot2 tutorials and manual almost 1:1.

The gallery provides many nice examples of the usage: https://plotnine.readthedocs.io/en/stable/gallery.html
Maybe it would be helpful to add these examples to the Python graph gallery?

Beautiful circos plots in matplotlib

Hi, please let me promote my developing library.

You mentioned, "The most common library like Matplotlib and Seaborn will not be of any help to build one." on your website.
However, I manage and develop pyCircos that allow drawing circos plots (chord diagrams).
The library is implemented based on matplotlib, so the drawn object can be customized in a general matplotlib manner.
The following example plot is generated by using pyCircos.
download

If you are interested in pyCircos, please try to execute the example code on Google colab.
I would like to be glad if you could introduce pyCircos on your website.

bug on #300

Reference: https://github.com/holtzy/The-Python-Graph-Gallery/blob/master/src/notebooks/300-draw-a-connection-line.ipynb

ERROR: GeodError: inv_intermediate: npts and del_s are mutually exclusive, only one of them must be != 0.

This is happening, because when compiling, there are equal points being compiled, and therefore there is no possibility of plotting the line that interconnects the points. As the image below:
image.png

Solution suggestion.

Loop on every pair of cities to add the connection

for startIndex, startRow in df.iterrows():
for endIndex in range(startIndex, len(df.index)):
endRow = df.iloc[endIndex]
if startRow.city == endRow.city:
pass
else:
m.drawgreatcircle(startRow.lon, startRow.lat, endRow.lon, endRow.lat, linewidth=1, color='#69b3a2');

Hope this helps.

wrong links for grouped/stacked barplot

Hello Mr. Holtz,

I just wanted to notify you (in case you did not know) that there is an error in the links found in the section 'Stacked and Grouped barplot with Matplotlib' in https://www.python-graph-gallery.com/barplot/.

So the error is that if you click the stacked barplot image you are redirected to the grouped barplot page, and the same happens for the grouped barplot image, but it redirects you to the stacked barplot page.

Thanks for your amazing work.

Kind regards,

Ricard

Histogram is not exclusive to numeric variables

"<p>A <a href='https://www.data-to-viz.com/graph/histogram.html'>Histogram</a> represents the distribution of a numeric variable for one or several groups. The values are split in bins, each bin is represented as a bar. This page showcases many histograms built with python, using both the <code>seaborn</code> and the <code>matplotlib</code> libraries.</p>";

A Histogram represents the distribution of a numeric variable

Histograms are commonly used for any kind of variable including non-numeric, i.e. categorical variables.

mtcars missing

Dear Yan Holtz:
Sorry to bother you!
I am writing to ask for your help with the file from this file.
https://python-graph-gallery.com/wp-content/uploads/mtcars.csv
It seems that this file is no longer there. Could you please send me this csv file?!
I am trying to do some heatmap clustering with dendrogram and needs some help and example.
Your help will be most appreciated and have a nice day!

Alternate Design forms: Weighted Graphs for Correlation Networks

Observing https://github.com/holtzy/The-Python-Graph-Gallery/blob/master/src/notebooks/327-network-from-correlation-matrix.ipynb
With reference to WestHealth/pyvis#123 and

Instead of using thresholds, is it possible to simply weight the connections between 0 and infinity?

https://towardsdatascience.com/eveything-you-need-to-know-about-interpreting-correlations-2c485841c0b8

On this page, anything under 0.3 makes negligible correlation, and anything over 0.9 is clearly correlated, with 0.6 being the middle of correlation significance. Possibly, for scaling purposes (where 0 correlation leads to 0 weight, and 0.6 correlation leads to 1, 1 correlated to b^0.583):

from numpy import tanh, exp
def scale(x):
    return exp(tanh((x-0.6)/0.6))

No More Sadness and Despair for Hierarchical Edge Bundling with Python.

If you're aware of any tip to build it, please let me knwo!

I built and maintain a python library for network visualisation called netgraph.
Netgraph accepts igraph and networkx Graph objects as input (as well as many other sensible data structures to represent graphs in python).

For edge bundling, netgraph implements the FDEB algorithm proposed by Holten & Wijk (2009).

Example visualization that combines a modular node layout with edge bundling:

import matplotlib.pyplot as plt
import networkx as nx

from netgraph import Graph # pip install netgraph

# create a modular graph
partition_sizes = [10, 20, 30, 40]
g = nx.random_partition_graph(partition_sizes, 0.5, 0.1)

# position nodes according to their community using the `community` node layout
node_to_community = dict()
node = 0
for community_id, size in enumerate(partition_sizes):
    for _ in range(size):
        node_to_community[node] = community_id
        node += 1

# color nodes according to their community
community_to_color = {
    0 : 'tab:blue',
    1 : 'tab:orange',
    2 : 'tab:green',
    3 : 'tab:red',
}
node_color = {node: community_to_color[community_id] for node, community_id in node_to_community.items()}

Graph(g,
      node_color=node_color, node_edge_width=0, edge_alpha=0.1,
      node_layout='community', node_layout_kwargs=dict(node_to_community=node_to_community),
      edge_layout='bundled', edge_layout_kwargs=dict(k=2000),
)

plt.show()

community_layout

Bug circular packing?

I came across your document on the web regarding the Basic Circle Packing Chart. You stated that the second column (Value) of the dataframe will control the bubble size. But from the chart created, it seems like the value didn’t control the size cause D is way smaller than F and the other circles are not scaled proportionately. May I know how do i make the size of the bubbles based on the value?

Add time spirals?

Time spirals are cool! You should consider adding them to the site (which I BTW really like).
screen shot 2018-08-24 at 16 08 55

Source (PDF, page 6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.