scalanlp / breeze-viz Goto Github PK
View Code? Open in Web Editor NEW*breeze-viz has moved back to the main breeze repo*
License: Apache License 2.0
*breeze-viz has moved back to the main breeze repo*
License: Apache License 2.0
Hey Martin,
I cut a new minor release of Breeze. Any objections to cutting a new release of Breeze Viz that just updates the Breeze dependency?
-- David
GNUplot is a really mature and maintained graphing solution.
It supports as many output formats as you'd imagine, ranging from SVG, PNG, interactive, PDF, Latex (EPS + .tex file with textual data).
The generation of such graph is really simple, since it's just text (which we could dynamically generate), no code or libraries to be called.
It also supports 3D surface graphing.
Breeze 0.10 has been released and many other libraries are using it. If you depend on some of these libraries as well as breeze-viz you will end up with two different versions of brezze.
For example: Users should be able to use this in their build.sbt
:
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % "0.10",
"org.scalanlp" %% "breeze-viz" % "0.10"
)
Currently that will print this error
[info] Resolving org.scalanlp#breeze-viz_2.10;0.10 ...
[warn] module not found: org.scalanlp#breeze-viz_2.10;0.10
[warn] ==== local: tried
[warn] /Users/tobber/.ivy2/local/org.scalanlp/breeze-viz_2.10/0.10/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/scalanlp/breeze-viz_2.10/0.10/breeze-viz_2.10-0.10.pom
[warn] ==== Sonatype Snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/org/scalanlp/breeze-viz_2.10/0.10/breeze-viz_2.10-0.10.pom
[warn] ==== Sonatype Releases: tried
[warn] https://oss.sonatype.org/content/repositories/releases/org/scalanlp/breeze-viz_2.10/0.10/breeze-viz_2.10-0.10.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scalanlp#breeze-viz_2.10;0.10: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
I tried importing breeze-viz-2.10-0.11.2 into a Databricks environment. Here is a code snippet I used to test basic operations.
import breeze.linalg._
import breeze.plot._
val f = Figure()
val p = f.subplot(0)
val x = linspace(0.0,1.0)
p += plot(x, x :^ 2.0)
p += plot(x, x :^ 3.0, '.')
p.xlabel = "x axis"
p.ylabel = "y axis"
f.saveas("lines.png")
It gives me the following exception:
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at breeze.plot.Figure.breeze$plot$Figure$$frame$lzycompute(Figure.scala:88)
at breeze.plot.Figure.breeze$plot$Figure$$frame(Figure.scala:87)
at breeze.plot.Figure.refresh(Figure.scala:132)
at breeze.plot.Figure$$anon$1.refresh(Figure.scala:181)
at breeze.plot.Plot$$anonfun$refresh$3.apply(Plot.scala:51)
at breeze.plot.Plot$$anonfun$refresh$3.apply(Plot.scala:51)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at breeze.plot.Plot.refresh(Plot.scala:51)
at breeze.plot.Plot.$plus$eq(Plot.scala:33)
I read some Stack Overflow posts advising to explicitly set java.awt.headless to true, but it doesn't seem to have any effect. Also java.awt.GraphicsEnvironment.isHeadless() returns true.
My environment is Databricks version 2.0.1 running Scala 2.10.4 and Oracle Java 1.7.0_65.
Is breeze-viz suitable for use in a notebook environment such as Databricks? It would be nice to use with Scala notebooks (similar to matplotlib with Python notebooks).
Is it possible to more charting to SVG and OpenGL than depend on JFreeChart.
Hi David,
I'm very much willing in taking over and continuing the visualisation as I can provide experience with JFreeChart and have done scientific visualisation.
Apart from that I have done rendering of LaTex labels / figure descriptions, etc. in order to enrich figures by proper math typed text and lables. Technically, LaTex was rendered to a Java Graphics2D with JLaTexMath.
Furthermore, rendering to a specialized PdfGraphics2D gave the possibility to easily export to pdf. (which is very handy for publishing figures in publications etc.)
Let me know your comments.
Cheers,
Martin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.