Skip to content

Commit

Permalink
Improve readme file
Browse files Browse the repository at this point in the history
- Centered header and logo
- Table of contents
- Badges!!!
  • Loading branch information
vojtamolda committed Feb 5, 2020
1 parent 3212fe3 commit bedeab6
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
<div align="center">
<img alt="Plotly" src="https://images.plot.ly/logo/new-branding/plotly-logomark.png" width="158">


# Plotly.swift

Library that brings interactive [Plotly](https://plot.ly/javascript/) charts to [Swift](https://swift.org/). It is designed to be simple and easy to use thanks to the interface that follows the [Swift API design guidelines](https://swift.org/documentation/api-design-guidelines/).
### Beautiful, interactive plotting library for Swift built on top of [Plotly](https://plot.ly).

![Logo](https://upload.wikimedia.org/wikipedia/commons/3/37/Plotly-logo-01-square.png)
[![BuildBadge]][Build] [![VersionBadge]][Version] [![ContributionsBadge]][Contributions] [![LicenseBadge]][License] [![SwiftBadge]][Swift]

[Usage](#usage)[Internals](#internals)[License](#license)
</div>

Library that brings interactive [Plotly](https://plot.ly/javascript/) charts to [Swift](https://swift.org/). It is designed to be simple and easy to use thanks to the interface that follows the [Swift API design guidelines](https://swift.org/documentation/api-design-guidelines/).

The design goal is to display an interactive chart of your data as quickly as possible without compromising the more advanced use cases. The intention is to create a plotting tool that can be brought to the rescue in the middle of a debugging session. It is especially helpful to people who work with numeric code, like simulations, data science or machine learning.

---
**Warning**: _This package is in early alpha stage and the releases before version `1.0.0` doesn't follow [semantic versioning](https://semver.org/). Symbol and method names may and generally will change. Before the `1.0.0` release, the recommendation is to depend on `.exact("0.x.y")` version to make_ sure your code doesn't break later.


## Usage
# Usage

### Jupyter Notebook
Copy and paste the following lines into the first cell:
## Jupyter Notebook
Copy and paste the following line into the first cell:

```swift
%install '.package(url: "https://github.com/vojtamolda/Plotly.swift.git", .exact("0.x.y"))' Plotly
%include "EnableJupyterDisplay.swift"
```

### Package Dependency
## Package Dependency
To include the library as a part of your project, add the following dependency to your `Package.swift` manifest file:

```swift
Expand All @@ -30,7 +37,7 @@ dependencies: [
]
```

### Example Chart
## Example Chart
Here's a simple example code that creates a line plot:

```swift
Expand All @@ -44,7 +51,7 @@ figure.show()
<img src="https://images.plot.ly/plotly-documentation/images/output.png" alt="Example" width="60%">


## Internals
# Internals

Internal infrastructure of the library is built on top of [Plotly.js](https://github.com/plotly/plotly.js) and [D3.js](https://d3js.org/) JavaScript packages. Under the hood, Swift instances of chart data, layout and configuration are converted to a serialized JSON representation, packaged and then sent to a browser. Browser is then responsible for rendering of the chart and it also handles user interaction events.

Expand All @@ -54,6 +61,25 @@ Internal infrastructure of the library is built on top of [Plotly.js](https://gi
[Swift Package Manager](https://swift.org/package-manager/) is used for distribution, building, running and testing.


## License
# License

Library is licensed under the MIT license. See [the text](License.txt) for more details.





[Build]: https://github.com/vojtamolda/Plotly.swift/actions
[BuildBadge]: https://img.shields.io/github/workflow/status/vojtamolda/Plotly.swift/Swift%20Package.svg "Build Status"

[Version]: https://github.com/vojtamolda/Plotly.swift/tags
[VersionBadge]: https://img.shields.io/github/v/tag/vojtamolda/Plotly.swift.svg?label=version&color=lightgrey "Latest Version"

[License]: https://en.wikipedia.org/wiki/MIT_License
[LicenseBadge]: https://img.shields.io/github/license/vojtamolda/Plotly.swift.svg?color=blue "MIT License"

[Contributions]: https://github.com/vojtamolda/Plotly.swift/pulls
[ContributionsBadge]: https://img.shields.io/badge/contributions-welcome-blueviolet.svg "Contributions Welcome"

[Swift]: https://developer.apple.com/swift/
[SwiftBadge]: https://img.shields.io/badge/swift-5.1-orange.svg "Swift 5"

0 comments on commit bedeab6

Please sign in to comment.