scikit-learn VS matplotlib

Compare scikit-learn vs matplotlib and see what are their differences.

scikit-learn

scikit-learn: machine learning in Python (by scikit-learn)

matplotlib

matplotlib: plotting with Python (by matplotlib)
Our great sponsors
  • Scout APM - A developer's best friend. Try free for 14-days
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • SaaSHub - Software Alternatives and Reviews
scikit-learn matplotlib
24 11
48,081 14,603
1.6% 2.2%
9.9 10.0
3 days ago 5 days ago
Python Python
BSD 3-clause "New" or "Revised" License Python License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

scikit-learn

Posts with mentions or reviews of scikit-learn. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-13.

matplotlib

Posts with mentions or reviews of matplotlib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-30.
  • Problem with surface plot color and legend
    1 project | reddit.com/r/learnpython | 24 Nov 2021
    # https://old.reddit.com/r/learnpython/comments/r1etmt/problem_with_surface_plot_color_and_legend/ # AmericaRL_03.py # Comparação entre random walk e difusão em 1d import numpy as np import matplotlib.pyplot as plt M = 100000 # Número de walkers L = 100 # Tamanho da malha # A cada intervalo de tempo, mover o walker e propagar a difusão p = 0.1 # Probabilidade de andar pinv = 1.0 - p nsteps = 2001 # Número de intervalos de tempo # Iniciando as concentrações c = np.zeros((2, 2 * L + 1, 2 * L + 1)) i0 = 0 i1 = 1 c[:, L, L] = M # c[:,L,L] corresponde a (x,y) = (0,0) edgesdiff = np.array(range(-L - 1, L + 1)) - 0.5 xc = 0.5 * (edgesdiff[:-1] + edgesdiff[1:]) xx, yy = np.meshgrid(xc, xc) D = p noutput = 100 for it in range(nsteps): # Executar a etapa na equação de difusão for ix in range(1, len(c[0]) - 1): for iy in range(1, len(c[0]) - 1): # Usar i0 e gerar i1 c[i1, ix, iy] = c[i0, ix, iy] + D * ( c[i0, ix - 1, iy] + c[i0, ix + 1, iy] - 4 * c[i0, ix, iy] + c[i0, ix, iy - 1] + c[i0, ix, iy + 1] ) # Inverter i0 e i1 ii = i1 i1 = i0 i0 = ii # Plotar as concentrações if np.mod(it, noutput) == 0: fig = plt.figure() ax = fig.add_subplot(111, projection="3d") # ax.cla() diff = ax.plot_surface(xx, yy, c[0, :, :], cmap="Reds", label="Difusão") plt.title("Tempo = {}, M = {}, p = {}".format(it, M, p)) ax.set_xlabel("Distância percorrida (x)") ax.set_ylabel("Distância percorrida (y)") ax.set_zlabel("Concentração") # ax.legend() fails getting proper label key color in 3D plots # # AttributeError missing _facecolors2d and _edgecolors2d are raised # in 3D projection method get_facecolor() used by legend handler # # Is open issue since 2015 # https://github.com/matplotlib/matplotlib/issues/4067 if False: # OP's way: Set values manually to keep legend() quiet diff._facecolors2d = diff._facecolor3d diff._edgecolors2d = diff._edgecolor3d ax.legend() # But then problems with legend() getting proper legend key color # default (blue) is used instead of a value from set cmap (Reds) else: # DIFFERENT FIX: Draw legend key and legend label manually # # First get suitable cmap color (instead blue default) # https://stackoverflow.com/a/25408562 from matplotlib.cm import get_cmap cmap = get_cmap('Reds') my_red_rgba = cmap(0.5) # e.g. a color in middle of range (0..1) # Then insert own artist for legend key and legend label # https://matplotlib.org/stable/tutorials/intermediate/legend_guide.html import matplotlib.patches as mpatches red_patch = mpatches.Patch(color=my_red_rgba, label='Difusão') ax.legend(handles=[red_patch]) # plt.show() plt.savefig('tempo_{}.png'.format(it),dpi = 600) plt.pause(0.001) ax.cla() # is nicer placed here instead above
  • Python 3.8, 3.9 or 3.10 for new projects?
    3 projects | reddit.com/r/Python | 30 Oct 2021
    matplotlib supports 3.10 since May
  • Top 10 Python Libraries for Machine Learning
    14 projects | dev.to | 9 Sep 2021
    Website: https://matplotlib.org/ Github Repository: https://github.com/matplotlib/matplotlib Developed By: Micheal Droettboom, Community Primary purpose: Data Visualization
  • Should you learn Julia or Python for Machine Learning?
    8 projects | reddit.com/r/learnmachinelearning | 15 Aug 2021
    But, now we have to get used to Python's library of Machine Learning packages: tensorflow, numpy, matplotlib, and finally pandas
  • Is there a way to improve this code?
    1 project | reddit.com/r/learnpython | 3 Apr 2021
  • Top 10 Python Libraries
    14 projects | dev.to | 24 Mar 2021
    Download the latest version of Matplotlib or visit its GitHub repo for more information.
  • Matplotlib: why do plot and axes interfaces use different method names to do the exact same thing?
    1 project | reddit.com/r/learnpython | 5 Mar 2021
    I think sloppiness explains it, this explains how you can fix it ;)
  • How I create GitHub project reporting from scratch
    10 projects | dev.to | 5 Mar 2021
    Firstly, I tried the most popular visualization library matplotlib. But its configuration didn’t seem clear to me, so moved on with other options.
  • Valentine's Day Challenge
    1 project | reddit.com/r/cryptography | 17 Feb 2021
    That would explain the link to https://matplotlib.org/ in the file...
  • What API suits the creation of a modern dynamic GUI used primarily for plotting in real time?
    2 projects | reddit.com/r/learnpython | 14 Feb 2021
    Matplotlib? https://matplotlib.org/

What are some alternatives?

When comparing scikit-learn and matplotlib you can also consider the following projects:

plotly - The interactive graphing library for Python (includes Plotly Express) :sparkles:

PyQtGraph - Fast data visualization and GUI tools for scientific / engineering applications

pygal - PYthon svg GrAph plotting Library

bokeh - Interactive Data Visualization in the browser, from Python

bqplot - Plotting library for IPython/Jupyter notebooks

Keras - Deep Learning for humans

Surprise - A Python scikit for building and analyzing recommender systems

Prophet - Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

tensorflow - An Open Source Machine Learning Framework for Everyone

plotnine - A grammar of graphics for Python

VisPy - Main repository for Vispy

ggplot - ggplot port for python