7

I'm looking for free Windows software or a web app that lets me compose simple graphs with a 'sketch' style, as if drawn freehand. I want to use them to illustrate points made in a text (blog).

Requirements:

  • Color, maybe styles
  • Be able to put some ticks/data points on the axis
  • Different graph types (lines, bars); 2D is good enough
  • Ability to add some text in the same style (although that can probably be done later in any image editor)
  • Free to publish the graphs, a small corner logo/watermark would be OK
  • I would primarily use it 'freehand draw' a graph, but maybe actual data input that generates the graph will come in handy too

Some examples I found doing a Google image search for 'sketch graph':

13

Python with numpy and matplotlib will let you rapidly draw a wide range of graphs and includes an xkcd plotting style, (based on XKCD cartoons).

All of the above are:

  • Free, Gratis & Open Source
  • Cross Platform

To cover your requirements:

  • Color, maybe styles Colour definitely
  • Be able to put some ticks/data points on the axis No Problem
  • Different graph types (lines, bars); 2D is good enough The XKCD style can be applied to just about any of the matplotlib 2D & 3D graph types you can even have 2/3D animated plots
  • Ability to add some text in the same style (although that can probably be done later in any image editor) It is there already.
  • Free to publish the graphs, a small corner logo/watermark would be OK Completely free, no logo or watermark unless you choose to add one.
  • I would primarily use it 'freehand draw' a graph, but maybe actual data input that generates the graph will come in handy too No freehand but you can very quickly plug in rough sample data. note that you can also use python to query web, database, file or physical sources

Note that you can save your plots as png, eps, jpeg, pdf, pgf, ps, svg, tiff, etc.

Example code

Demo from the gallery

import matplotlib.pyplot as plt
import numpy as np

with plt.xkcd():
    # Based on "Stove Ownership" from XKCD by Randall Monroe
    # http://xkcd.com/418/

    fig = plt.figure()
    ax = fig.add_axes((0.1, 0.2, 0.8, 0.7))
    ax.spines['right'].set_color('none')
    ax.spines['top'].set_color('none')
    plt.xticks([])
    plt.yticks([])
    ax.set_ylim([-30, 10])

    data = np.ones(100)
    data[70:] -= np.arange(30)

    plt.annotate(
        'THE DAY I REALIZED\nI COULD COOK BACON\nWHENEVER I WANTED',
        xy=(70, 1), arrowprops=dict(arrowstyle='->'), xytext=(15, -10))

    plt.plot(data)

    plt.xlabel('time')
    plt.ylabel('my overall health')
    fig.text(
        0.5, 0.05,
        '"Stove Ownership" from xkcd by Randall Monroe',
        ha='center')

    # Based on "The Data So Far" from XKCD by Randall Monroe
    # http://xkcd.com/373/

    fig = plt.figure()
    ax = fig.add_axes((0.1, 0.2, 0.8, 0.7))
    ax.bar([-0.125, 1.0 - 0.125], [0, 100], 0.25)
    ax.spines['right'].set_color('none')
    ax.spines['top'].set_color('none')
    ax.xaxis.set_ticks_position('bottom')
    ax.set_xticks([0, 1])
    ax.set_xlim([-0.5, 1.5])
    ax.set_ylim([0, 110])
    ax.set_xticklabels(['CONFIRMED BY\nEXPERIMENT', 'REFUTED BY\nEXPERIMENT'])
    plt.yticks([])

    plt.title("CLAIMS OF SUPERNATURAL POWERS")

    fig.text(
        0.5, 0.05,
        '"The Data So Far" from xkcd by Randall Monroe',
        ha='center')

plt.show()

enter image description here enter image description here

It even works with 3D plots as shown in the development process on this ticket: enter image description here

  • 1
    Mmmmm, I'm not particularly happy with learning yet another programming language, but I can see that this gives me a wide range of control. – Jan Doggen Jun 5 '16 at 19:54
  • 2
    @Jan, It's Python, not some random jargon. You likely already know it. :) – Andrea Lazzarotto Jun 5 '16 at 20:15
  • 1
    @AndreaLazzarotto From his comment, he likely does not. – Jeremy Banks Jun 6 '16 at 5:28
  • 2
    @Jeremy, OP asked for a solution to plot data. One has to do some work to get it done. In Italy we say "you can't have a jar full of wine and a drunk wife at the same time". – Andrea Lazzarotto Jun 6 '16 at 9:05
  • +1 ... more great Italian sayings, please !! – Mawg Jan 8 '18 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.