[Thread Prev][Thread Next][Index]

Re: [ferret_users] Upgrade Ferret and Histogram/Bar-Chart



Hi -
You can create a new variable using the "constant array" syntax, containing the values that you want.

   yes? let var4 = {`A1[1i=70,j=150]`,`A2[i=170,j=150]`, `A3[i=170,j=150]`, `A4[i=170,j=150]`}

(the `var`  syntax means that the value of the variable is substituted at the time the LET command is read in by Ferret; see "grave accent" in the Users Guide.  You could actually do this without the grave accents too, if you want.)

Then you could use this command,

    yes? plot/step=connected var4

or look at the scripts for bar charts.  From the Unix command line,

> Fgo bar_chart

You'll see that there's a script bar_chart_demo.jnl.  That would be the place to start

On 7/14/2011 7:52 PM, dessy berlianty wrote:
Dear Ansley and Ferret Users,

Special thanks to Ansley because completely help and confirm me about upgrade matter.

And while I am trying to upgrade Ferret by install Unix at first, I also would like asking for other silly question, I think.
It should be simple, but I am almost desperate to find the best script to make histogram or bar-chart for my data.

For initial information, I have four kind data (say A1, A2, A3, and A4) by 186 x 160 of matrices for each data.
I would like to make graph to compare value of (for example) A1[170,150], A2[170,150], A3[170,150], and A4[170,150].
Actually, I already got the result that I want by list command to show the value.
But, I can not plot it the graph just like I want eventhough I already search and apply based on references from Ferret UserGuide, Ferret UserGroups Archives, also Ferret FAQ.

One more time, I also know that Ferret can not define a variable as array, like following:
    let var[1]=A1[170,150]
    let var[2]=A2[170,150]
    let var[3]=A3[170,150]
    let var[4]=A4[170,150]
But I need this kind of definition, to graph my data. I hope someone can help and give best solution for this matter.

If there any help, I would be really appreciate it.. please.
Thank you very much.

Sincerely yours,

dessy


From: Ansley Manke <Ansley.B.Manke@xxxxxxxx>
To: dessy berlianty <dessyberlianty@xxxxxxxxx>
Cc: Ferret users <oar.pmel.ferret_users@xxxxxxxx>
Sent: Friday, July 15, 2011 1:22 AM
Subject: Re: [ferret_users] vector type and insert small sinusoidal graph to main graph

Hi -
No, you will not be able to upgrade Ferret; there is no more-recent version for Windows XP.  Our current suggestion for people who want to try it, is to install Unix on their PC and then a modern version of Ferret under that Unix operating system. There is more information about that on the Ferret downloads pages.

Try the suggestions in the FAQ for making thicker lines from your metafile plot. I think that will give you the best black-and-white image results.

Ansley

On 7/13/2011 7:18 PM, dessy berlianty wrote:
Dear Ansley-san,

Thank you very much for your suggestion.
Now, I try to upgrade my Ferret to v6.7, but actually my OS is Windows XP, I don't know it is suitable or not to using v6.7.
So, I will send kind of report to this group whether I am failed or succeed in upgrade my Ferret soon.

And about vector line styles, actually, I will apply black/white graph, so that's why I have restriction to use color line.
From your suggestion about Fprint, I'll try it eventhough it is very new begining for me.

Finally, thank you for your kindly help.

Sincerely yours,

dessy


From: Ansley Manke <ansley.b.manke@xxxxxxxx>
To: dessy berlianty <dessyberlianty@xxxxxxxxx>
Cc: "ferret_users@xxxxxxxx" <oar.pmel.ferret_users@xxxxxxxx>
Sent: Thursday, July 14, 2011 1:48 AM
Subject: Re: [ferret_users] vector type and insert small sinusoidal graph to main graph

Hi -
I think you'll be very happy if you upgrade your Ferret; you'll be able to use the graticules and lots of other new features that have been added to Ferret since then.  Let's wait and see if you are able to use ferret -gif  once you upgrade - if not we can help you check into what's happening.

About vector line styles,  a couple of ideas. There is an FAQ about line-thickness in postscript output, which may be all that you need:
http://ferret.pmel.noaa.gov/Ferret/faq/changing-line-thickness-in-postscript-files

You can get a dashed line for vectors, but only for postscript output from a metafile.  In Fprint, there is an option to translate the metafile into a black-and-white or a color plot.  Here is the help from Fprint:

> Fprint
Script to translate Ferret's graphics metafile(s) to PostScript
usage: Fprint [-P printer || -o file_name || -X]
              [-p landscape || portrait] [-# <number of copies>]
              [-l ps || cps] [-R] metafile(s)
 
   -P: send PostScript output to the named printer
   -o: send PostScript output to a file and don't print the plots
   -X: send the plots to your X Window for preview
   -p: page orientation, landscape or portrait
   -#: print more than one copy of the plots
   -l: line styles, ps == monochrome, cps == color
   -R: do not rename files with a date stamp appended (default is to stamp)
   -C: Output a CMYK postscript file (default is RGB)
Examples:
    Fprint metafile.plt*
    Fprint -P marker -l cps -# 10 metafile.plt*
    Fprint -p portrait -R metafile.plt.~2~
So, make your plot with different color pens for the different styles,
yes? set mode meta
yes? ...
yes? vector u1,v1                      ! solid lines
yes? vector/over/color=green u2,v2     ! dotted lines  (or equivalently /pen=3)
yes? vector/over/color=lightblue u3,v3 ! dashed lines  (or equivalently /pen=5)
yes? ...
Then translate that to postscript with  '-l ps'
>  Fprint -l ps metafile.plt -o blackwhite.ps

--Ansley

On 7/13/2011 1:37 AM, dessy berlianty wrote:
Dear Ferret Users,

I am using Ferret v5.53, and I think probably will not try to upgrade this version... :&quot;> blushing

After searching in Ferret User-Guide and Ferret Users Group & E-mail Archive, I can not find the way to make dash vector.

I will use this kind of vector to separate my graph into three range value. I applying three thickness command (thick=1, 2, and 3), but the result shows not quite different for each thick command.

I also tried using hgrat, but I think this command is not suitable in my Ferret version.

My next question is how to insert small figure to main figure? Actually, I always failed trying use Ferret -gif, any suggestion about this problems?

Thank you in advance for any help and suggestion.

Sincerely yours,

dessy





[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement