|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 15:43:03
|
Hi Is there anyway to rename the y values from scientific to characters? for example "3e+9" to "3G". There are some formatting methods with '%' but I can not find which one can do the job. Regards, Mahmood |
|
From: Theo <th...@gm...> - 2013-09-27 16:02:45
|
set format y "%c" |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 16:48:13
|
>set format y "%c" It just show G G G M there is no number Regards, Mahmood ________________________________ From: Theo <th...@gm...> To: gnu...@li... Sent: Friday, September 27, 2013 7:32 PM Subject: Re: [Gnuplot-info] formatting ytics set format y "%c" ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: BBands <bb...@gm...> - 2013-09-27 16:57:16
|
Mahmood, gnuplot formatting is very similar to C, so you can do just about anything you like. There is a good outline of the possibilities here. http://www.cplusplus.com/reference/cstdio/fprintf/ HTH, John On Fri, Sep 27, 2013 at 9:48 AM, Mahmood Naderan <nt_...@ya...> wrote: > >>set format y "%c" > It just show > G > G > G > M > there is no number |
|
From: BBands <bb...@gm...> - 2013-09-27 17:00:42
|
There are better examples here: http://www.cplusplus.com/reference/cstdio/printf/ Best, John On Fri, Sep 27, 2013 at 9:48 AM, Mahmood Naderan <nt_...@ya...> wrote: > >>set format y "%c" > It just show > G > G > G > M > there is no number |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 17:25:16
|
Yes I know that but these specifiers are good for hex and scientific numbers (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 number to 3G. I think I have to write a script to preprocess that. Thanks Regards, Mahmood ________________________________ From: BBands <bb...@gm...> To: gnuplot <gnu...@li...> Sent: Friday, September 27, 2013 8:30 PM Subject: Re: [Gnuplot-info] formatting ytics There are better examples here: http://www.cplusplus.com/reference/cstdio/printf/ Best, John On Fri, Sep 27, 2013 at 9:48 AM, Mahmood Naderan <nt_...@ya...> wrote: > >>set format y "%c" > It just show > G > G > G > M > there is no number ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Hans-Bernhard B. <HBB...@T-...> - 2013-09-27 17:36:55
|
Am 27.09.2013 19:25, schrieb Mahmood Naderan: > Yes I know that but these specifiers are good for hex and scientific numbers (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 number to 3G. > I think I have to write a script to preprocess that. Thanks No, you don't. You only need to read all of "help set format", including the examples, and use what you learnt there. |
|
From: Leo B. <l_b...@us...> - 2013-09-27 19:47:20
|
> From: Mahmood Naderan <nt_...@ya...> > > Thanks a lot. I was writing a python script to preprocess the values! > > Just want to know how someone should conclude "%.sG" for such formatting? > From the manual http://gnuplot.sourceforge.net/docs_4.2/node184.html, we read: Mahmood, I would suggest an alternative approach to your problem: rescale your y values and include the scale information in the ylabel rather than in the tick labels. Leo |
|
From: BBands <bb...@gm...> - 2013-09-27 17:41:42
|
I sort of hate it when I hear can't be done... set format y "%.sG" John On Fri, Sep 27, 2013 at 10:25 AM, Mahmood Naderan <nt_...@ya...> wrote: > Yes I know that but these specifiers are good for hex and scientific numbers > (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 > number to 3G. > I think I have to write a script to preprocess that. Thanks |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 18:11:57
|
Thanks a lot. I was writing a python script to preprocess the values! Just want to know how someone should conclude "%.sG" for such formatting? From the manual http://gnuplot.sourceforge.net/docs_4.2/node184.html, we read: If the format string is omitted, the format will be returned to the default "% g" ... %e or %E exponential notation; an "e" or "E" before the power %g or %G the shorter of %e (or %E) and %f ... The default format for both axes is "% g", but other formats such as "%.2f" or "%3.0em" are often desirable .... Characters not preceded by "%" are printed verbatim. Thus you can include spaces and labels in your format string, such as "%g m", which will put " m" after each number. If you want "%" itself, double it: "%g %%". Regards, Mahmood ________________________________ From: BBands <bb...@gm...> To: gnuplot <gnu...@li...> Sent: Friday, September 27, 2013 9:11 PM Subject: Re: [Gnuplot-info] formatting ytics I sort of hate it when I hear can't be done... set format y "%.sG" John On Fri, Sep 27, 2013 at 10:25 AM, Mahmood Naderan <nt_...@ya...> wrote: > Yes I know that but these specifiers are good for hex and scientific numbers > (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 > number to 3G. > I think I have to write a script to preprocess that. Thanks ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Theo <th...@gm...> - 2013-09-28 06:47:54
|
> I sort of hate it when I hear can't be done... > > set format y "%.sG" > > John > Really??? At my GnuPlot 4.6 this just adds G at each tic lable. I think what Mahmood was looking for, e.g.: set yrange [1e-18:1e18] set ytics 10 set format y "%.2s %c" As Bernhard wrote... also look e.g. at the example in the Gnuplot 4.6 PDF manual, page 113, example 6. Theo. |