Hello Christian,

first of all, thank you for your fast response.
Sounds like my guess was right, using the 'x coord trafo' is the right way to 
accomplish my needs.

Unfortunately your attached draft dosn't compile on my machine.
The compiler is telling me ./P.tex:67: Undefined control sequence.
I'm using the MacTeX-2010 distribution bases on TeX Live 2010.
I attached the error log.

Now in the pdf you attached, the x-axis coords are integers but I like to get 
the 'widthxheight' strings in my plot instead.
I thought that is the purpose of 'x coord inv trafo' that has to be defined... 
or am I messing things up here?
Maybe you could shed some light on it.

Best regards

Ken

> 
> Am 07.03.2011 um 22:21 schrieb Christian Feuersaenger:
> 
> > Hello Ken,
> > 
> > thank you for your feedback!
> > 
> > Yes, it is indeed possible to use the 'x coord trafo' key to create such a 
> > dictionary dynamically.
> > 
> > Does the attached draft fulfill your needs?
> > 
> > It re-generates a dictionary for every new encountered coordinate (!).  It 
> > also contains an (uncommented) hint how to re-use existing dictionary 
> > entries without overwriting them, in case you need it (try it out).
> > If you need it, you may also want to reset the assigned numbers before 
> > processing a further plot: this can be realized by placing
> > \global\kencount=0
> > just before an \addplot or \begin{axis} statement (again, try it out).
> > 
> > Note that the coordinates are mapped in the order of appearance -- you will 
> > need to sort the data.
> > 
> > 
> > Best regards
> > 
> > Christian
> > 
> > Am 07.03.2011 13:35, schrieb garbage...@arcor.de:
> > > Hello everyone,
> > > 
> > > pgfplots supports the "symbolic x coords" key which implements a 
> > > dictionary which maps strings to numerical
> > > data and backwards automatically.
> > > 
> > > I am trying to plot a datafile with x values representing different image 
> > > resolutions. These values are strings in the format "widthxheight". 
> > > Currently i'm using
> > > 
> > > \begin{axis}[symbolic x coords={64x64, 122x34, 64x128,...,128x128, 
> > > 128x136, 128x256}, xtick=data]
> > > 
> > > to provide a string dictionary to pgfplots.
> > > 
> > > For some reason the datafile could contain a huge number of different 
> > > (random) resolution strings and i don't like the idea to adjust the fixed 
> > > dictionary to get my plot right, every time the datafile has changed.
> > > 
> > > Is there a way to use pgfplots with some kind of a dynamic dictionary 
> > > maybe generated from the x coords in the datafile?
> > > 
> > > Another way could be the use of 'the x coord trafo' key i read about in 
> > > the manual. The Resolutions strings need to be transformed to numbers. 
> > > But i have no idea how to use x coord trafo in my case and how i 
> > > transform an random string into a running numerical index. I admit, i 
> > > have very little knowledge about tikz, pgf and latex macros.
> > > Any ideas how to do this?
> > > 
> > > Here's an example of the datafile format I'm talking about:
> > > 
> > > #resolution min_µs avg_µs max_µs
> > > 64x64 431 1060 6225
> > > 64x128 468 589 1424
> > > 128x128 488 558 1112
> > > 128x136 520 655 1612
> > > ...
> > > 128x256 670 750 1783
> > > 
> > > Best regards
> > > 
> > > Ken
> > > 
> > > ------------------------------------------------------------------------------
> > > What You Don't Know About Data Connectivity CAN Hurt You
> > > This paper provides an overview of data connectivity, details
> > > its effect on application quality, and explores various alternative
> > > solutions. http://p.sf.net/sfu/progress-d2d
> > > _______________________________________________
> > > Pgfplots-features mailing list
> > > Pgfplots-features@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Attachment: P.log
Description: Binary data

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to