<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="359291" data-post-id="359291">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tmbb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tmbb
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-359291-version-081-1" class="anchor" href="#p-359291-version-081-1" aria-label="Heading link" rel="nofollow"></a>Version 0.8.1</h2>
<p>With this new version, I was finally able to update the docs to hexdocs (<a href="https://hexdocs.pm/quartz/api-reference.html" class="inline-onebox" rel="noopener nofollow ugc">API Reference — Quartz v0.8.1</a>) by moving all images to a new website: <a href="https://tmbb.github.io/quartz/" rel="noopener nofollow ugc">https://tmbb.github.io/quartz/</a>.  This is currently hosted on GitHub pages, but when I have the time, I’ll host it in its own domain. These changes allow me to remain within the size limits of hexdocs.</p>
<p>Demo for some of the supported plots here: <a href="https://tmbb.github.io/quartz/plot_types.html" rel="noopener nofollow ugc">https://tmbb.github.io/quartz/plot_types.html</a></p>
<h2><a name="p-359291-plotting-api-2" class="anchor" href="#p-359291-plotting-api-2" aria-label="Heading link" rel="nofollow"></a>Plotting API</h2>
<p>The plotting API is inspired by Matplotlib. Despite being quite old, Matplotlib is very functional for my needs and makes it very easy to customize the plots, which is important for publication-quality figures.</p>
<p>I really don’t like frameworks which encourage any kind of “grammar of graphics”, which always seem very artificial to me and obscure what would usually be simple plotting commands.</p>
<h2><a name="p-359291-contributing-3" class="anchor" href="#p-359291-contributing-3" aria-label="Heading link" rel="nofollow"></a>Contributing</h2>
<p>I will have a bit more free time in April, and I would like to refactor the code to stabilize the interface and make it easier for external contributors. I think this package could be a good alternative to generate plots for scientific paper or other static media (like Matplotlib). Together with my Ulam package, one can already create, fit and plot Bayesian models, and honestly I prefer to manage Elixir projects as opposed to Python projects (packaging is python projects is rather problematic).</p>
<p>I don’t know if people are still trying to develop an ecosystem for scientific programming in Elixir, but if so, Quartz would be an interesting part of such ecosystem.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359291" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/quartz-data-visualization-library-aimed-at-publication-not-interactive-display/56576/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-359291" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359291"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #31"></div>
  </section>
</div>
    <div class="postbit" id="370592" data-post-id="370592">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tmbb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tmbb
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-370592-big-update-integration-with-sciex-1" class="anchor" href="#p-370592-big-update-integration-with-sciex-1" aria-label="Heading link" rel="nofollow"></a>Big update - Integration with SciEx</h2>
<p>I have finally released a SciEx on hex.pm, which means that Quartz can now depend on SciEx, which provides some rust-based goodies which are very intersting, like support for proper contours and isobands (not completely implemented yet) and better KDE algorithms (not implemented in  Quartz yet).</p>
<p>Not that the code below uses the <code>SciEx.Float64.Array2</code> data type from SciEx, which is actually the first good implementation of a 2D array I’ve seen in Elixir (it uses Rust’s <code>ndarray</code> as a backend and it can be made to support matrix multiplications, FFT, etc.)</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    height_map = Array2.from_image("test/data/heightmaps/image.png")

    snapshot = Path.join(@out_dir, "countour_1_snapshot.png")

    figure =
      Figure.new([width: Length.cm(8), height: Length.cm(6)], fn _fig -&gt;
        _plot =
          Plot2D.new()
          |&gt; Plot2D.put_title("A. From heightmap")
          |&gt; Plot2D.put_axis_label("x", "Horizontal")
          |&gt; Plot2D.put_axis_label("y", "Vertical")
          |&gt; Plot2D.draw_contour_plot(height_map, [0.2, 0.4, 0.6, 0.8])
          |&gt; Plot2D.finalize()
      end)

    Figure.render_to_png_file(figure, snapshot)
</code></pre>
<p>Which renders the following contour map (future versions might support smoothing).</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/c/b/cbdcc050aff0eac8d64b19a91813723fd1bfaf30.png" data-download-href="https://forum.elixirforum.com/uploads/default/cbdcc050aff0eac8d64b19a91813723fd1bfaf30" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/c/b/cbdcc050aff0eac8d64b19a91813723fd1bfaf30.png" alt="image" data-base62-sha1="t5rSNs5kNQTGuY93VKQzDqCjila" width="690" height="517" data-dominant-color="737373"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">945×709 43.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370592" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/quartz-data-visualization-library-aimed-at-publication-not-interactive-display/56576/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-370592" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370592"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>