comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » plot String data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: plot String data [message #93144 is a reply to message #93140] Mon, 02 May 2016 13:31 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Sunday, May 1, 2016 at 6:56:34 PM UTC+1, AGW wrote:
> hi,
> I have string data and normal data , I want to plot this data as X axis string data and Y x with normal data.
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;
> openr,1,'/home/a.txt'
> a=strarr(49)
> readf,1,a
> openr,2,'/home/b.dat'
> b=fltarr(49)
> readf,2,b
> plot,a,b
> end
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;
> but it is not true.

I did this sort of thing using function graphics. In my case, I did a histogram of the frequency with which certain words appeared. I then sorted the words according to their frequency and plotted this in a barplot type histogram. This works however also for a simple plot().
Basically it is something like this:

xx = findgen(10)
yy = findgen(10)
pp = plot(xx,yy)
pp['xaxis'].tickInterval = 1
tn = pp['xaxis'].tickname
for i=0,9 do tn[i]=string(byte(i)+97b)
tn[10] = ''
pp['xaxis'].tickname = tn

Something like this was shown a few days ago on the newsgroup and I found it really nice. I think it was Pablo P.

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Can i use CONTOUR to retrieve the subscripts within a closed contour?
Next Topic: Very basic IDL vector question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:46:30 PDT 2025

Total time taken to generate the page: 0.00418 seconds