Just committed to the SVN:

   - *New: *XTICKFORMATNUMBER_CB and YTICKFORMATNUMBER_CB callbacks for
   *IupPlot*.

  They are called right before the tick number is drawn, so it can be used
to change its format, or change the displayed value.

Best,
Scuri

*XTICKFORMATNUMBER_CB*: allows to modify the displayed string of a tick
number in the X axis. If the callback is not defined the internal function
is used. (since 3.28)

int function(Ihandle **ih*, char* *buffer*, char* *format*, double
*x*, char* *decimal_symbol*); [in
C]*ih*:xtickformatnumber_cb(*format*: string*, x*: number,
*decimal_symbol*: string) -> (*ret*: number, *buffer*: string) [in
Lua]

*ih*: identifier of the element that activated the event.
*buffer*: buffer that will receive the string with the formatted number. In
Lua the string is returned by the callback, then copied to the buffer. The
buffer is limited to 128 characters.
*format*: the format string used by the internal function to format the
number.
*x*: X coordinate value of the tick number.
*decimal_symbol*: the decimal symbol used by the internal function.

Returns: If IUP_IGNORE the number is not plotted. If IUP_CONTINUE the
internal function is used.




Em seg, 20 de mai de 2019 às 01:26, Milind Gupta <milind.gu...@gmail.com>
escreveu:

> So what I have is a function y = f(tp) where f is a function of a pulse
> width measured in nano seconds. So I have the y points for every tp points
> and I can plot it. Now the x axis contains points which are in nano
> seconds. Like there is a point for say y1,250ns, y2, 500ns which are the
> numbers displayed on the x axis. This plot is fine. But the real
> information that I want to show is the y plot and the corresponding
> frequency associated with these time points. So I would still like to plot
> y1 and y2 but on the x axis instead of showing 250ns I want to show
> 1/(2*250ns) = 2MHz and for y2 I want to show 1MHz.
>           I cannot simply plot the graph as y1,2MHz and y2,1MHz because
> the scale changes and the linear plot in the time x axis becomes a non
> linear 1/x plot in the frequency x axis. So I just want to replace the text
> on the a scale which says 250ns to 2MHz and the text 500ns to 1MHz.
>
> Milind
>
> On Wed, May 15, 2019 at 11:51 AM Antonio Scuri <antonio.sc...@gmail.com>
> wrote:
>
>>   No, but I don't think I fully understand what you want...
>>
>> Best,
>> Scuri
>>
>>
>> Em qua, 15 de mai de 2019 às 15:34, Milind Gupta <milind.gu...@gmail.com>
>> escreveu:
>>
>>> Yes the tick numbers that represent the X axis scale values.
>>>
>>> On Wed, May 15, 2019 at 11:06 AM Antonio Scuri <antonio.sc...@gmail.com>
>>> wrote:
>>>
>>>>   Hi,
>>>>
>>>>   Are you talking about the tick numbers on the axis?
>>>>
>>>> Best,
>>>> Scuri
>>>>
>>>>
>>>> Em qua, 15 de mai de 2019 às 14:51, Milind Gupta <
>>>> milind.gu...@gmail.com> escreveu:
>>>>
>>>>> Hi,
>>>>>        Is there a way that I can plot a graph using a set of numbers
>>>>> for the X values but on the graph display a different set of transformed
>>>>> values. So that the scaling of the axis is set by the original set and the
>>>>> second set is only used to display on the plot for better reading.
>>>>>
>>>>> Thanks,
>>>>> Milind
>>>>> _______________________________________________
>>>>> Iup-users mailing list
>>>>> Iup-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>>>
>>>> _______________________________________________
>>>> Iup-users mailing list
>>>> Iup-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>>
>>> _______________________________________________
>>> Iup-users mailing list
>>> Iup-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>
>> _______________________________________________
>> Iup-users mailing list
>> Iup-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to