Hi Christian

Many thanks for your response.  For completeness, I am attaching a new
working version of my example, which takes into account your and
Clemens's suggestions.

The only thing missing now is some way to take per-point values from a
data column for the "/pgfplots/nodes near coords align" parameter
("above", "below", "left", etc).  That would help in avoiding
collisions between the labels and would allow me to use a larger font
size.  Is it at all possible?

Cheers

Will

On Sat, Jan 28, 2012 at 9:01 AM, Christian Feuersaenger
<[email protected]> wrote:
> Hi William,
>
> Thanks for your report. In fact, you did all well - but your example
> reveals two bugs in pgfplots:
>
> 1. it seems to make a difference if you use
>
> \addlegendentry{[\ion{Ne}{2}]}
>
> or
>
> \legend{[\ion{Ne}{2}], ....}
>
> --> the \legend variant fails with some error. This is a bug in
> pgfplots, caused by the square brackets which are handled correctly in
> \addlegendentry and incorrectly in \legend (sorry).
>
> 2. The failure of \ref{marker:Ne3} in your example is also a bug in
> pgfplots: it failed to process the 'error bars/.cd' properly while
> processing options for the reference picture.
>
> A work-around is too use the equivalent syntax
>     error bars/x dir=both,
>     error bars/x explicit,
>     error bars/y dir=none,
>
> and omit the 'error bars/.cd'.
>
>
> I have recorded both bugs; Sorry about that.
>
> Best regards
>
> Christian
>
>
> Am 28.01.2012 15:56, schrieb William Henney:
>> ---------- Forwarded message ----------
>> From: William Henney<[email protected]>
>> Date: Sat, Jan 28, 2012 at 8:55 AM
>> Subject: Re: [Pgfplots-features] How to customize legend labels for
>> scatter/classes?
>> To: Clemens Helfmeier<[email protected]>
>>
>>
>> Hi Clemens
>>
>> On Sat, Jan 28, 2012 at 8:34 AM, Clemens Helfmeier
>> <[email protected]>  wrote:
>>> to modify the literal string in the legend, use the 
>>> \addlegendentry{\ion{Ne}{2}}
>>> command. It works for graphs and for scatter classes. Just add labels in the
>>> order they appear as scatter classes.
>> That works!  I was sure I had tried that before and couldn't get it to
>> work, but I must have had some other error at the time.
>>
>> Many thanks
>>
>> Will
>>
>>> Best regards,
>>>   Clemens
>>>
>>>
>>>
>>> On Fri, Jan 27, 2012 at 09:48:27PM -0600, William Henney wrote:
>>>> Hi list
>>>>
>>>> I've recently started using pgfplots and am very impressed so far. Mostly, 
>>>> I
>>>> have found answers to all my questions in the excellent manual, but today I
>>>> hit a problem that I couldn't get round.
>>>> Hopefully, someone on this list can help me out.
>>>>
>>>> In the attached figure, I am using scatter/classes with a column that is 
>>>> read
>>>> from the accompanying data file.  This works fine, and I can make a legend
>>>> showing each class and accompanying marker.  But I want to modify the text
>>>> that appears in the legend for each class, so that it isn't just the 
>>>> literal
>>>> string from the "meta" data column.  For instance, I want it to be
>>>> "[\ion{Ne}{2}]" instead of "Ne2".  Is this possible?
>>>>
>>>> Another thing I tried was to use the extended \label[...]{...} syntax
>>>> discussed in the manual (p.79), but I couldn't get it to work.  When I
>>>> uncomment the line containing \ref, I get various errors such as "! Package
>>>> pgfkeys Error: I do not know the key '/pgfplots/error
>>>> bars/mark'", see attached log file.
>>>>
>>>> Cheers
>>>>
>>>> Will
>>>>
>>>> --
>>>>
>>>>    Dr William Henney, Centro de Radioastronomía y Astrofísica,
>>>>    Universidad Nacional Autónoma de México, Campus Morelia
>>>
>>>
>>>
>>>> ------------------------------------------------------------------------------
>>>> Try before you buy = See our experts in action!
>>>> The most comprehensive online learning library for Microsoft developers is
>>>> just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro
>>>> Style Apps, more. Free future releases when you subscribe now!
>>>> http://p.sf.net/sfu/learndevnow-dev2
>>>> _______________________________________________
>>>> Pgfplots-features mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/pgfplots-features
>>>
>>>   Clemens Helfmeier
>>
>>
>> --
>>
>>    Dr William Henney, Centro de Radioastronomía y Astrofísica,
>>    Universidad Nacional Autónoma de México, Campus Morelia
>>
>>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Pgfplots-features mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pgfplots-features



-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

Attachment: ratios-figure.tex
Description: TeX document

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Pgfplots-features mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to