<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 381: %c working with non-linear units</title><link>https://sourceforge.net/p/gnuplot/feature-requests/381/</link><description>Recent changes to 381: %c working with non-linear units</description><atom:link href="https://sourceforge.net/p/gnuplot/feature-requests/381/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sun, 16 Mar 2014 20:07:56 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gnuplot/feature-requests/381/feed.rss" rel="self" type="application/rss+xml"/><item><title>#381 %c working with non-linear units</title><link>https://sourceforge.net/p/gnuplot/feature-requests/381/?limit=25#8fb3</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket moved from /p/gnuplot/bugs/1357/&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ethan Merritt</dc:creator><pubDate>Sun, 16 Mar 2014 20:07:56 -0000</pubDate><guid>https://sourceforge.neted1727a851907720d2c115bfb4b0796e45d89e50</guid></item><item><title>#1357 %c working with non-linear units</title><link>https://sourceforge.net/p/gnuplot/bugs/1357/?limit=25#5e34</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In my opinion this is more a feature request than a bug.&lt;br /&gt;
Ethan, could you please move this tracker item?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bastian Märkisch</dc:creator><pubDate>Sun, 16 Mar 2014 20:03:17 -0000</pubDate><guid>https://sourceforge.net4463fedb10947c8bb467f38b8fe08093861f73c7</guid></item><item><title>%c working with non-linear units</title><link>https://sourceforge.net/p/gnuplot/bugs/1357/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The %c format specifiers for formatting axis tics is awesome but it may lack an issue.&lt;/p&gt;
&lt;p&gt;Assume a=1345.13 and you want to output it as "%g%cm" where m is a literal that stands for meter (the unit). You get 1.34513km. Good.&lt;/p&gt;
&lt;p&gt;Now you want to output a as "%g%cm^{-1}" you still get 1.344513km^{-1}. Under SI rules, it should read 1.344513mm^{-1} since it is understood that the exponent always alters both the unit (meter) and the prefix (milli).&lt;/p&gt;
&lt;p&gt;Sort of an modifiers for %c may easily solve this problem. For instance the modifier - so that %-c may alter the behaviour of %c: when catching the scientific power (3 in the example), change sign (-3) and get the appropriate character replacement for scientific power.&lt;/p&gt;
&lt;p&gt;Some complexities arise if the exponent is other than -1. If you want to output "%g%cm^2" the gnuplot solution 1.34513km^2 is not good either. However I can't hardly see any comprehensive solution to m^2 or m^3 if your character replacement jumps in three orders of magnitude (that makes 6 orders of magnitude for m^2 and 9 orders for m^3). In this case you just shouldn't take advantage of the %c format specifier. &lt;/p&gt;
&lt;p&gt;However, the case m^{-1} is easily solvable and could be frequently used.&lt;/p&gt;
&lt;p&gt;I attach an example using:&lt;br /&gt;
set format x "%.s%cJ"&lt;br /&gt;
set format y "%.s%cJ^{-1}"&lt;br /&gt;
set logscale x&lt;br /&gt;
set logscale y 1000&lt;/p&gt;
&lt;p&gt;Char replacentment in the y-axis should read, from low to high, 1GJ^{-1}, 1MJ^{-1}, 1 kJ^{-1} and 1J^{-1}. X-axis shows energy, Y-axis density of probability &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 15 Mar 2014 20:48:42 -0000</pubDate><guid>https://sourceforge.net8ebcc8e748f6cc8805f702af26ecdeca8fbd891f</guid></item></channel></rss>