<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 381: %c working with non-linear units</title><link href="https://sourceforge.net/p/gnuplot/feature-requests/381/" rel="alternate"/><link href="https://sourceforge.net/p/gnuplot/feature-requests/381/feed.atom" rel="self"/><id>https://sourceforge.net/p/gnuplot/feature-requests/381/</id><updated>2014-03-16T20:07:56.171000Z</updated><subtitle>Recent changes to 381: %c working with non-linear units</subtitle><entry><title>#381 %c working with non-linear units</title><link href="https://sourceforge.net/p/gnuplot/feature-requests/381/?limit=25#8fb3" rel="alternate"/><published>2014-03-16T20:07:56.171000Z</published><updated>2014-03-16T20:07:56.171000Z</updated><author><name>Ethan Merritt</name><uri>https://sourceforge.net/u/sfeam/</uri></author><id>https://sourceforge.neted1727a851907720d2c115bfb4b0796e45d89e50</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket moved from /p/gnuplot/bugs/1357/&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#1357 %c working with non-linear units</title><link href="https://sourceforge.net/p/gnuplot/bugs/1357/?limit=25#5e34" rel="alternate"/><published>2014-03-16T20:03:17.842000Z</published><updated>2014-03-16T20:03:17.842000Z</updated><author><name>Bastian Märkisch</name><uri>https://sourceforge.net/u/markisch/</uri></author><id>https://sourceforge.net4463fedb10947c8bb467f38b8fe08093861f73c7</id><summary type="html">&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;</summary></entry><entry><title>%c working with non-linear units</title><link href="https://sourceforge.net/p/gnuplot/bugs/1357/" rel="alternate"/><published>2014-03-15T20:48:42.416000Z</published><updated>2014-03-15T20:48:42.416000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net8ebcc8e748f6cc8805f702af26ecdeca8fbd891f</id><summary type="html">&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;</summary></entry></feed>