How to set log scale as default in CurveWidget (ie not changing to it interactively)

38 views
Skip to first unread message

yann lecoq

unread,
Sep 7, 2014, 2:15:46 PM9/7/14
to guidata...@googlegroups.com
Hello and thanks for this great piece of software.

I'm trying to make a plot from a Python program that immediately appears in log scale with guiqwt.plot.CurveWidget (ie without having to interactively change the axis setups). I use python 2.7 with QT designer4. 

I am probably missing something obvious, but I couldn't find functions in this class that looks like they can setup properties of the plot from the source code (ie similar to set_axis_scale() in BasePlot for exemple). Is there any way to do so ?

Thanks for your help, and sorry if that was obvious.

 

Russ Berg

unread,
Sep 11, 2014, 12:31:46 PM9/11/14
to guidata...@googlegroups.com

How are you trying to call set_axis_scale()?

If your CurveWidget is called curvewidget lets say, you should only need to call:

 

curvewidget.plot.set_axis_scale(axis_id, scale) where axis_id is one of:

               ‘top’,’bottom’,’left’,’right’

And scale is either:

               ‘lin’ or ‘log’

--
You received this message because you are subscribed to the Google Groups "guidata/guiqwt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guidata_guiqw...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yann lecoq

unread,
Sep 15, 2014, 1:06:36 PM9/15/14
to guidata...@googlegroups.com


Thank you very much Russ for your help. This did what was intended. Retrospectively I see that I was indeed missing something quite simple... 

Thanks again
Reply all
Reply to author
Forward
0 new messages