Crafty Statistical Graphics for Julia: GiovineItalia / Gadfly

Gadfly is a plotting and data visualization system written in Julia.

It's influenced heavily by Leland Wilkinson's book The Grammar of Graphics and Hadley Wickham's refinement of that grammar in ggplot2.

Package features

  • Renders publication quality graphics to SVG, PNG, Postscript, and PDF
  • Intuitive and consistent plotting interface
  • Works with IJulia out of the box
  • Tight integration with DataFrames.jl
  • Interactivity like panning, zooming, toggling powered by Snap.svg
  • Supports a large number of common plot types

Installation & Quickstart

Gadfly is registered on METADATA.jl and so can be installed using Pkg.add.

Pkg.add("Gadfly")

To create a plot it's as simple as:

using Gadfly
plot(y=[1,2,3])

Gallery

Gadfly Gallery

Documentation

  • STABLEmost recently tagged version of the documentation.
  • DEVELin-development version of the documentation.

Contributing and Questions

This is a new and fairly complex piece of software. Filing an issue to report a bug, counterintuitive behavior, or even requesting a feature is extremely valuable in helping us prioritize what to work on, so don't hesitate.

If you have a question then you can ask for help in the plotting team of the Julia Slack channel or the Gitter chat room.

Download Details:

Author: GiovineItalia
The Demo/Documentation: View The Demo/Documentation
Download Link: Download The Source Code
Official Website: https://github.com/GiovineItalia/Gadfly.jl
License: MIT

#julia #programming

What is GEEK

Buddha Community

Crafty Statistical Graphics for Julia: GiovineItalia / Gadfly

Crafty Statistical Graphics for Julia: GiovineItalia / Gadfly

Gadfly is a plotting and data visualization system written in Julia.

It's influenced heavily by Leland Wilkinson's book The Grammar of Graphics and Hadley Wickham's refinement of that grammar in ggplot2.

Package features

  • Renders publication quality graphics to SVG, PNG, Postscript, and PDF
  • Intuitive and consistent plotting interface
  • Works with IJulia out of the box
  • Tight integration with DataFrames.jl
  • Interactivity like panning, zooming, toggling powered by Snap.svg
  • Supports a large number of common plot types

Installation & Quickstart

Gadfly is registered on METADATA.jl and so can be installed using Pkg.add.

Pkg.add("Gadfly")

To create a plot it's as simple as:

using Gadfly
plot(y=[1,2,3])

Gallery

Gadfly Gallery

Documentation

  • STABLEmost recently tagged version of the documentation.
  • DEVELin-development version of the documentation.

Contributing and Questions

This is a new and fairly complex piece of software. Filing an issue to report a bug, counterintuitive behavior, or even requesting a feature is extremely valuable in helping us prioritize what to work on, so don't hesitate.

If you have a question then you can ask for help in the plotting team of the Julia Slack channel or the Gitter chat room.

Download Details:

Author: GiovineItalia
The Demo/Documentation: View The Demo/Documentation
Download Link: Download The Source Code
Official Website: https://github.com/GiovineItalia/Gadfly.jl
License: MIT

#julia #programming

Monty  Boehm

Monty Boehm

1656522240

A Julia Package for Probability Distributions & Associated Functions

Distributions.jl

A Julia package for probability distributions and associated functions. Particularly, Distributions implements:

  • Moments (e.g mean, variance, skewness, and kurtosis), entropy, and other properties
  • Probability density/mass functions (pdf) and their logarithm (logpdf)
  • Moment generating functions and characteristic functions
  • Sampling from population or from a distribution
  • Maximum likelihood estimation

Note: The functionalities related to conjugate priors have been moved to the ConjugatePriors package.

Resources

Documentation: https://JuliaStats.github.io/Distributions.jl/stable/

Support: We use GitHub for the development of the Julia package Distributions itself. For support and questions, please use the Julia Discourse forum. Also, for casual conversation and quick questions, there are the channels #helpdesk and #statistics in the official Julia chat (https://julialang.slack.com). To get an invitation, please visit https://julialang.org/slack/.

Contributing

Reporting issues

If you have a bug linked with Distributions, check that it has not been reported yet on the issues of the repository. If not, you can file a new issue, add your version of the package which you can get with this command in the Julia REPL:

julia> ]status Distributions

Be exhaustive in your report, give the summary of the bug, a Minimal Working Example (MWE), what happens and what you expected to happen.

Workflow with Git and GitHub

To contribute to the package, fork the repository on GitHub, clone it and make modifications on a new branch, do not commit modifications on master. Once your changes are made, push them on your fork and create the Pull Request on the main repository.

Requirements

Distributions is a central package which many rely on, the following are required for contributions to be accepted:

Docstrings must be added to all interface and non-trivial functions.

Tests validating the modified behavior in the test folder. If new test files are added, do not forget to add them in test/runtests.jl. Cover possible edge cases. Run the tests locally before submitting the PR.

At the end of the tests, Test.detect_ambiguities(Distributions) is run to check method ambiguities. Verify that your modified code did not yield method ambiguities.

Make according modifications to the docs folder, build the documentation locally and verify that your modifications display correctly and did not yield warnings. To build the documentation locally, you first need to instantiate the docs/ project:

julia --project=docs/
pkg> instantiate
pkg> dev .

Then use julia --project=docs/ docs/make.jl to build the documentation.

Citing

See CITATION.bib, or use the DOI badge above.

Author: JuliaStats
Source Code: https://github.com/JuliaStats/Distributions.jl 
License: View license

#julia #statistics 

Layout.jl: Graphics Layout Management for Julia

Graphical layout manager for Julia

This is intended for experiments with graphical layout management in Julia. It's not clear whether this has a long-term future as a standalone repository, or whether it will be integrated into other packages. For now, it's separate just to avoid breaking things in those other packages.

Rough sketch of "vision"

  1. Implement the "flexible core," probably based on a linear programming model such as the Auckland Layout Model. (Paper) This will support figures as vector-graphics files (svg, pdf, etc), and impose very few built-in constraints on layout. We may also want to support other optimizers besides linear programming. If they can't run quickly, they may not be suitable for real-time window resizing, but they could be used to create figures for publication.
  2. Find out whether the flexible core can be directly used for window resize events via callbacks (main targets might be Tk and HTML5/CSS). If not, then we probably need a raw representation that directly exposes the toolkit's manager, and then for SVG/PDF/etc we may need to mimic the toolkit's behavior in the context of the flexible core (yuck).
  3. Figure out how to integrate this into Compose and/or Winston.

Examples of layout

Image1 challenges:

  1. Marginal axes must be aligned with the axes of the scatterplot
  2. The image must not look squashed or stretched along any axis
  3. Image is aligned with the scatterplot
  4. Adequate space for all labels, without overlapping other elements

Status

There's a first draft of a working manager, based on linear programming. The test file "simple.jl" should run and produce reasonable results.

The LP interface is based on SymbolicLP.

Download Details:

Author: Timholy
Source Code: https://github.com/timholy/Layout.jl 
License: MIT license

#julia #graphic #layout 

Statistics with Julia: The Free eBook

This free eBook is a draft copy of the upcoming Statistics with Julia: Fundamentals for Data Science, Machine Learning and Artificial Intelligence. Interested in learning Julia for data science? This might be the best intro out there.

The majority of debates, discussions, and flame wars regarding the programming languages for data science tend to focus on Python and R. While these may be the 2 most used languages in the space, that doesn’t mean that they are the only options available, nor does it mean that they are even necessarily the “best” choices. One additional option, among many, is Julia, a fast, dynamic, open source general purpose programming language which is seen as a desirable data science skill to consider adopting.

One of the best introductions that I have encountered for using the language for data science is the book Statistics with Julia: Fundamentals for Data Science, Machine Learning and Artificial Intelligence, written by Yoni Nazarathy and Hayden Klok, and currently in draft form. The book’s website can be found here, while its accompanying code examples are available in this GitHub repository.

#2020 sep tutorials # overviews #books #data science #free ebook #julia #statistics

Julia Package for Click Maps & Advanced interaction with Graphics

Click!

Julia package to allow simpler interaction with graphics

Warning

Large portions of this package still need testing so not everything is guaranteed to work.

Image Maps

The simplest application of this library is to create a click map for a static image that is loaded into a GUI. Create the image map and connect it to the underlying GUI using this package as seen below for Gtk.

This code (example/gtk_ex2.jl) creates a window with a square in the center of the window that opens an info dialog when clicked.

#!/usr/bin/env julia
using Click, Click.Primitives, Gtk, Graphics

# create a 200x200 canvas in a window
canvas = @GtkCanvas(200, 200)
win = @GtkWindow(canvas, "Gtk Example")

# Setup drawing the rectangle
@guarded draw(canvas) do c
  ctx = getgc(c)
  set_source_rgb(ctx, 1.0, 0.0, 0.0)
  rectangle(ctx, 50, 50, 100, 100)
  fill(ctx)
end

# create a 100x100 clickable rectangle
rect = Rectangle(50, 50, 100, 100)
clickRect = ClickableRectangle(rect)

# Attach a callback to a click event
attend(clickRect, :click) do widget
  global win
  info_dialog("Clicked the rectangle", win)
end

# create a ClickMap containing the clickable rectangle
m = SimpleClickMap(clickRect)

# link the click map to the canvas
link_click_map(canvas, m)

# Display the result
show(canvas)

# Pause main thread execution in non-interactive mode
if !isinteractive()
  signal_connect(win, :destroy) do widget
    Gtk.gtk_quit()
  end
  Gtk.gtk_main()
end

Using GTK and Compose

A very useful case is to make objects from a library, such as Compose*, which abstracts the drawing process, clickable. This example (example/gtk_compose_ex.jl) demonstrates this by allowing essentially the same square to be clicked at both locations at which it is drawn. It also hides certain implementation details such as Gtk's drawing loop.

#!/usr/bin/env julia

using Gtk, Compose, Click

# Create a 400x400 canvas
canvas = @GtkCanvas(400, 400)
win = @GtkWindow(canvas, "GTK-Compose Example")

rect = rectangle(0.25, 0.25, 0.5, 0.5)
vect = compose(context(0mm, 0mm, 300mm, 300mm),
         rectangle(0.0, 0.0, 1.0, 1.0),
         fill("green"),
         compose(context(0.0, 0.0, 0.5, 0.5),
           rect,
           fill("black")),
         compose(context(0.5, 0.5, 0.5, 0.5),
           rect,
           fill("blue")))

cl = create_clickable(rect, vect)

attend(cl, :click) do frm, x, y
  info_dialog("Clicked Square", win)
end

# Use the fuse function to stitch things together

# ComposeClickMap needs to wrap SimpleClickMap to account for pixel density
# which that object is updated with internal to fuse
fuse(SimpleClickMap(cl), canvas, vect)

show(canvas)

# block the main thread of execution if not interactive
if !isinteractive()
  signal_connect(win, :destroy) do widget
    Gtk.gtk_quit()
  end
  Gtk.gtk_main()
end

* Be careful with this at the moment as Compose support is a work in progress.

Download Details:

Author: Matt5sean3
Source Code: https://github.com/Matt5sean3/Click.jl 

#julia #maps #graphic